This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-14 09:54:32

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Squeak Helpsheet

Ok, I had an idea. As 2.0 is moving to Flash and Squeak is a language slowly fading out, we should pool our Squeak code snippets here, like a help sheet. Not tutorial after tutorial, but little 1-2 paragraph code snippets with an explanation.

Ill post an example soon...


You can now reach me on Twitter @johnnydean1_

Offline

 

#2 2011-08-14 09:55:33

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Squeak Helpsheet

x = y
ifTrue:[
<a>
]
ifFalse:[
<b>
].

In this example, "x" and "y" are variables and <a> and <b> are code. This runs as:
if x equals y
run <a>
otherwise (x does not equal y)
run <b>


You can now reach me on Twitter @johnnydean1_

Offline

 

#3 2011-08-14 10:14:26

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Squeak Helpsheet

Sprite Name = objName
Dialog Box:

Code:

DialogBoxMorph inform: 'contents' title: 'title'.

http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

Board footer