commandSpec:
('tell %m to' #c #doTellSpriteTo)code: (put in ScratchProcess instance private-special forms)
doTellSpriteTo
| t1 t2 t3 |
t1 _ stackFrame expression.
t2 _ stackFrame arguments.
t2 size = 0
ifTrue:
[t3 _ t1 argumentAt: 1.
^ self pushStackFrame: (ScratchStackFrame new expression: t3)].
self popStackFrame.
t3 _ t1 fullCopy.
t3
allMorphsDo: [:t4 | (t4 respondsTo: #receiver:)
ifTrue: [t4 receiver: (ScriptableScratchMorph new coerceSpriteArg: t2 first)]].
self pushStackFrame: (ScratchStackFrame new expression: t3 firstBlockList)finally, go to SpriteArgMorph other presentMenu, and after where it says
t3 do: [:t8 | t4 add: t8 objName action: t8].
put
t2 = #doTellSpriteTo
ifTrue:
[t4 labels at: 1 put: 'Stage' localized asUTF8.
t4 selections at: 1 put: t1 workPane].__________________________________________________________________________
For those of you out there who want to find a 'simpler' way of doing it,
tellSprite: t1 to: t2 t1 do: t2
will NOT work!!!!
Last edited by rubiks_cube_guy238 (2010-12-27 10:29:24)
Offline