coolhogs wrote:
I don't understand methods, but I understand blockspec.
Could someone please help?
Link me to a tutorial, explain it...
Just help me!
Methods are what blockspecs call. For example, ('move %n steps' #- #forward:) is the move (10) steps block. I'll dissect it: () are the parentheses that keep the block held together.
('move %n steps') that indicates what is shown (for more arguments/inputs, go to Scratch-Blocks>CommandBlockMorph>private>uncoloredArgMorphFor:).
('move %n steps' #-) The #- shows what type of block is is.
('move %n steps' #- #forward:) #forward: indicates the method.
To make a method, you go to a category in a class (primary example, do not add methods to without experience) for example, initialize. I only use this because it is used in almost every class. So then an example which has no functionality is highlighted for you to write your own method. Squeak is the least needed tutorial language. Look around in the category Kernel-Methods for some simple methods that are used all of the time.
Offline