I was trying to create my first block, and I had finished the block spec, it showed up as a block, but then I couldn't find it's code(method?). Where is it? The block Spec:
('%n ^ %n' #r #testMethod). under 'operators'.
Offline
the code for your block should go here:
Scratch-Objects/ScriptableScratchMorph/'...' ops/
'...' is type of block code for your block. i think you can put it under any ops.
the first line of code should look like this:
#testMethod
also, for user input, you have to use variables which i am not very good at coding in squeak so don't ask me about variables in squeak.
Offline
Um... How do I put it there?
Offline
('Bump!' #- #bumpTopic)
Last edited by parcheesidude (2011-07-10 10:58:36)
Offline
I couldn't type it!
Offline
bump?
Offline
Go to Scratch-Objects >> ScriptableScratchMorph instance >> other ops.
Paste in the following code:
x: t1 raisedTo: t2 ^ t1 raisedTo: t2
And your spec needs to be
('%n ^ %n' #r #x:raisedTo:)Offline
Thanks!
Offline