The hide list block
_____________________________________________________
block spec:
('hide list %L' #- #hideList: 'list')
no code
And there u have it!
Offline
kinker wrote:
The hide list block
_____________________________________________________
block spec:Code:
('hide list %L' #- #hideList: 'list')no code
And there u have it!
That didn't work for me.
Offline
zorket wrote:
kinker wrote:
The hide list block
_____________________________________________________
block spec:Code:
('hide list %L' #- #hideList: 'list')no code
And there u have it!That didn't work for me.
well in fact it's not true.
Offline
bbbeb wrote:
It takes a lot to make one.
Look at 2 things:
the hats
and the execution engine.
Actually, most of the time you don't need to bother with the execution engine. The script starting is done in the hat block, it just creates an instance of ScratchProcess - the main class in the Execution Engine - which then works by itself. You just need to code the hat block, and that can be done most of the time by tweaking existing hat blocks.
BTW - How do you access all existing instances of an object? If it includes the keyword allInstances remind me to kick myself. And how can I make the scratchProc and proc instance variables of a hat block morph dictionaries? Never mind why, I'll post if my idea works.
Last edited by TheSuccessor (2010-08-30 07:06:03)
Offline
delete your bumps please.
and what do you want it for? i need to know that to help (if i'm able too )
Last edited by LS97 (2010-08-30 12:22:53)
Offline
I was making pause/play blocks, and to make them work for every currently running script I need to access each existing instance of ScratchProcess.
EDIT: I've just had a thought. Maybe I could create a class variable in ScratchProcess called IsPaused and make the execution engine check that before it executes the next block.
Last edited by TheSuccessor (2010-08-30 12:47:55)
Offline
^ or make it a global!
Offline
^^ not really... ^^^^that would be enough
Offline
^^^^^ Global would work!
Offline
pwiter wrote:
I got a new block
http://img831.imageshack.us/img831/1435/capturesc.jpg
Instance ops:Code:
| dialogBox | dialogBox _ DialogBoxMorph new. dialogBox title: t1. dialogBox withButtonsForYes: false no: false okay: true cancel: false. dialogBox message: t2. dialogBox getUserResponse.Blockspecs
Code:
('show dialog titled %s with contents %s' #- #showDialogTitle:Contents: 'info' 'hello')Copyright pwitter 2010
What does it do?
Offline
zorket wrote:
pwiter wrote:
I got a new block
http://img831.imageshack.us/img831/1435/capturesc.jpg
Instance ops:Code:
| dialogBox | dialogBox _ DialogBoxMorph new. dialogBox title: t1. dialogBox withButtonsForYes: false no: false okay: true cancel: false. dialogBox message: t2. dialogBox getUserResponse.Blockspecs
Code:
('show dialog titled %s with contents %s' #- #showDialogTitle:Contents: 'info' 'hello')Copyright pwitter 2010
What does it do?
It opens up a dialog box titled whatever you want to say same for contents
Offline
Is there a block spec and method/code for the following blocks?
<undo pen> & <redo pen>
Offline
pwiter wrote:
zorket wrote:
pwiter wrote:
I got a new block
http://img831.imageshack.us/img831/1435/capturesc.jpg
Instance ops:Code:
| dialogBox | dialogBox _ DialogBoxMorph new. dialogBox title: t1. dialogBox withButtonsForYes: false no: false okay: true cancel: false. dialogBox message: t2. dialogBox getUserResponse.Blockspecs
Code:
('show dialog titled %s with contents %s' #- #showDialogTitle:Contents: 'info' 'hello')Copyright pwitter 2010
What does it do?
It opens up a dialog box titled whatever you want to say same for contents
Use this code instead.
dialog inform:t1 with title: t2
DialogBoxMorph inform: t1 withTitle:t2
Offline
LS97 wrote:
TheSuccessor wrote:
Can anybody explain the Execution Engine? It just seems to push and pop stack frames. Is pushing and popping the same thing JavaScript does to arrays?
that would be something nice ² explain. i never get it either.
Study the Source code carefully....
Ive been doing that for a couple of days now!!
Offline
Marioblender wrote:
Is there a block spec and method/code for the following blocks?
<undo pen> & <redo pen>
not at the moment, i might have the patience to make it. but it sure will take a lot.
bbeb wrote:
Not At the Moment I Think.
(I Think That Is Impossible!!) 0.o
nothing is impossible to code. even if you had to code scratch from scratch. but it's still not impossible.
Offline
^^ Ha ha from Scratch!!!
Offline
there was no pun intended there. laugh if you please
Offline
There is absolutely no point in creating a pause block. Why? Because how will it know when to resume if nothing is running? It can't. So you don't need the play either. If you want to make a pause, make it the BYOB3 way, like next to the green flag and stop sign.
Offline
Sperry wrote:
There is absolutely no point in creating a pause block. Why? Because how will it know when to resume if nothing is running? It can't. So you don't need the play either. If you want to make a pause, make it the BYOB3 way, like next to the green flag and stop sign.
It will resume when another script e.g. when sprite clicked or when key pressed is triggered later on. Also, you could have pause all scripts for sprite whatever and a similar play block.
Offline
or have
pause all other scripts.
Offline
How would you make a
<Sprite [ ] exsists?> (because of intensive cloning and deleting)
and a
[add ( ;; ) to costumes] (the weird thing is a costume block.)
Thank you.
Offline
spriteExists: t1 World submorphsDo: [:t2 | t2 isKindOf: ScratchSpriteMorph ifTrue: [t2 objName = t1 ifTrue: [^ true]]]. ^ false
I think this would work but as I haven't tried it I don't know.
Last edited by TheSuccessor (2010-09-01 07:47:42)
Offline
TheSuccessor wrote:
Code:
spriteExists: t1 World submorphsDo: [:t2 | t2 isKindOf: ScratchSpriteMorph ifTrue: [t2 objName = t1 ifTrue: [^ true]]]. ^ falseI think this would work but as I haven't tried it I don't know.
Thank you. I'll test the code.
Offline