LS97 wrote:
oh, and unless you will be including the 'when %b is true' in panther,
can i have some help on how to make it?
when: t1 t1 ifTrue: [^ true]. ^ false
OK i'm not the best squeaker but something like that should work!
EDIT: this is more for ('%b is true') boolean. It works, I've used it. made it myself and it still works!
NOTE: has no real purpose.
Last edited by Joeman592 (2010-06-12 00:25:32)
Offline
LS97 wrote:
@nXIII:
thanks!
although, i have one more question. how do you make the nested blocks repeat until a boolean comes true?
That's an already-defined special-form, I believe #doWhile, maybe?
Offline
nXIII wrote:
LS97 wrote:
@nXIII:
thanks!
although, i have one more question. how do you make the nested blocks repeat until a boolean comes true?That's an already-defined special-form, I believe #doWhile, maybe?
hmm... i suppose so.
i'll play around with those forms.
Offline
Bingo 1.1.0 is out!
now includes:
[blocks]
>> 2 new operator blocks
>> a new ''%b confirmed in dialog?'
>> Polished the skin a bit, folder pictures are now Vista-style
>> big change, Added compatibilty function; with it the categories disappear and Bingo becomes exactly like scratch
>> An 'Open' shortcut button next to the save and the language.
>> A 'last opened project' in the file menu that saves the path to the settings file
[/blocks]
Hope you all enjoy bingo, downloadable at
This Page
Last edited by LS97 (2010-06-11 04:05:39)
Offline
Thanks for the mod EXE tutorial, do you know how to make it ask for a file type other than .sb? My mod's files are saved as .zp, and it only lets you choose a .sb file to convert to EXE.
Offline
Zorbak42 wrote:
Thanks for the mod EXE tutorial, do you know how to make it ask for a file type other than .sb? My mod's files are saved as .zp, and it only lets you choose a .sb file to convert to EXE.
I can't hack into the EXE file, sorry.
but i can give you a solution:
simply type the project name in and it will use that name regardless of what default extension was defined.
Offline
LS97 can I ask you a question.
in squeak you have the code 'self' and then some code,
so in Panther you can have 'self setVar: () to: ()', do you know how I could do 2 of these in 1 block?
Offline
johnnydean1 wrote:
LS97 can I ask you a question.
in squeak you have the code 'self' and then some code,
so in Panther you can have 'self setVar: () to: ()', do you know how I could do 2 of these in 1 block?
two of thse what?
if you mean two 'self', no problem - simply add a dot (period, full stop, whatever) at the end of the line.
but i don't think that's what you mean. correct me if i'm wrong
Offline
Yes your right, thank you so much. Ive been wondering how for ages!
Offline
johnnydean1 wrote:
Yes your right, thank you so much. Ive been wondering how for ages!
well, glad you learned it. it's a key thing in Squeak pogramming
Offline
Well, I forgot how, lol. See I learnt it, went on holiday, got back and forgot it. Ive been trying to work it out ever since
Offline
johnnydean1 wrote:
Well, I forgot how, lol. See I learnt it, went on holiday, got back and forgot it. Ive been trying to work it out ever since
oh. lol. could've asked straight away!
Offline
True, but I like trying to do things myself
Offline
Ohh and 1 more thing:
You declare variables like this:
|t1 t2|
and sooo on
But how do you set t2 to 2 or something?
Offline
johnnydean1 wrote:
Ohh and 1 more thing:
You declare variables like this:
|t1 t2|
and sooo on
But how do you set t2 to 2 or something?
t2 = 2? Thats how its normaly done in other programming languages.
Offline
Dnt worry me and MP56 worked it out!
Offline
johnnydean1 wrote:
Dnt worry me and MP56 worked it out!
no you didn't.
here's how:
"declare them first"
| t1 t2 |
"then set them"
t1 _ 'something'.
t2 _ 'something else'.
the _ should appear as an arrow.
as for what key it is, it's a normal underscore.
EDIT:
to report what the variable is, use ^ (appears as arrow).
to use the variable in if statements, use the equal sign ( = ) like this:
t1 = false ifTrue: [do this]
ifFalse: [do that].
Last edited by LS97 (2010-06-11 17:18:17)
Offline
How to repeat code a number of times like the repeat block.
Offline
johnnydean1 wrote:
How to repeat code a number of times like the repeat block.
XX timesRepeat: [YY].
replace XX by the times you want to repeat, YY by the command that's repeated. you can add more than one command in the YY bit, like this:
10 timesRepeat: [World doOneCycleNow. viewerMorph updateCategorySelectors.]
separate the two commands by a dot and you're done!
Offline
Thank you sooo much. This will allow me to meake a block to get the friends of a user (using CYOB on Panther)!
Offline
LS97 wrote:
johnnydean1 wrote:
Dnt worry me and MP56 worked it out!
no you didn't.
here's how:
"declare them first"
| t1 t2 |
"then set them"
t1 _ 'something'.
t2 _ 'something else'.
the _ should appear as an arrow.
as for what key it is, it's a normal underscore.
EDIT:
to report what the variable is, use ^ (appears as arrow).
to use the variable in if statements, use the equal sign ( = ) like this:
t1 = false ifTrue: [do this]
ifFalse: [do that].
@EDIT:
Just pointing this out: (I've seen some very inefficient code like this)
this:
t1 ifTrue: [^ true]. ^ false
is the EXACT SAME THING as this:
^ t1
and it won't throw an error if t1 isn't a boolean.
Offline
nXIII wrote:
Just pointing this out: (I've seen some very inefficient code like this)
this:Code:
t1 ifTrue: [^ true]. ^ falseis the EXACT SAME THING as this:
Code:
^ t1and it won't throw an error if t1 isn't a boolean.
i know, i know,
but it was to show the use of the = sign as an example.
Last edited by LS97 (2010-06-12 13:57:32)
Offline
nXIII he was showing me how to do some squeak I forgot lol.
Offline
markyparky56 wrote:
Go ask Jens if there is a way of editing the imagefile, but he said that he removed the Editor from BYOB, I guess so people couldn't steal the BYOB interface
No, no, we just want people to steal one we're proud of -- right now the code is not in distributable condition. By the time of the Scratch conference in August we'll have an official release and it will have a dev menu with access to a browser.
Meanwhile, if all you want to do is add a simple block you can probably do it using Elements, which is Jens's Scratch-like drag-and-drop interface to the Smalltalk code.
Personally I'd be very happy if every Scratch modder includes BYOB in their mods! I want to take over the world! I want BYOB in Scratch 2.0!
Right now people are finding bazillions of bugs, and the program is incredibly slow, and you really don't want it in this condition, trust me. We're truly grateful to all the alpha testers who've been putting up with the annoyances of 2.99 and reporting bugs.
Offline
bharvey wrote:
markyparky56 wrote:
Go ask Jens if there is a way of editing the imagefile, but he said that he removed the Editor from BYOB, I guess so people couldn't steal the BYOB interface
No, no, we just want people to steal one we're proud of -- right now the code is not in distributable condition. By the time of the Scratch conference in August we'll have an official release and it will have a dev menu with access to a browser.
Meanwhile, if all you want to do is add a simple block you can probably do it using Elements, which is Jens's Scratch-like drag-and-drop interface to the Smalltalk code.
Personally I'd be very happy if every Scratch modder includes BYOB in their mods! I want to take over the world! I want BYOB in Scratch 2.0!
Right now people are finding bazillions of bugs, and the program is incredibly slow, and you really don't want it in this condition, trust me. We're truly grateful to all the alpha testers who've been putting up with the annoyances of 2.99 and reporting bugs.
To hack BYOB: make a turn fillscreen off block in the elements editor.
Offline