markyparky56 wrote:
nXIII wrote:
markyparky56 wrote:
Still not working...
*sigh*
Though this time i did get this:By the way, I'll point out WHAT is wrong...
showOrHideList: t1 show: t2
| t3 t4 t5 |
Supposed to have a parenthesis here: ( self listVarNames includes: t1)
IfFalse: supposed to be ifFalse: [^ self].
t3 _ lists at: t1.
t2
ifTrue: [(t4 _ self ownerThatIsA: ScratchStageMorph) ifNotNil: [t4 addMorph: t3]]
ifFalse: [t3 delete].
(t5 _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
t5 viewerPane categoryChanged: 'variables supposed to have a quote sign here: 'Still nothing. I dont see whats wrong!
Any ideas?
Offline
nXIII wrote:
LS97 wrote:
nXIII wrote:
Great ideas!
One note: for the 'stretch' reporter use 'size' because it reports the x scale!
I'll work on them after I finish a couple other things!great thanks. another idea is a (for me) vital 'bounce off (sprite) when touching it'. and enabled mesh... i had to re-enable it once i'd used your image. and if size reports x, could you make a Y reporter? and instead of change size change Ystrech? another useful block is to add symbols to the letter options, and fix the glitch that special keys dont work with the yellow 'when X key pressed' reporter block. and last but not at all least, (it's the hardest) make a 'take picture and add it to the [sprite] costumes' and a 'record sound and add it to the [sprite] sounds'.
i know it's a heck lot of work, but do what you can i would greatly appreciate it!
______
LS97 'Now Minutes Ago'Wait - the YELLOW 'when X key pressed' block?!
And my mesh IS enabled...
yes, the yellow hat block from the control category <when[]key pressed> doesnt work with all the special charachters you put (shift, backspace, etc). and never mind about mesh, i can always change it again! and btw, could you add a 'delete' key too?
Thanks!
______
LS97 'Now Minutes Ago'
Last edited by LS97 (2010-03-29 10:52:22)
Offline
LS97 wrote:
nXIII wrote:
LS97 wrote:
great thanks. another idea is a (for me) vital 'bounce off (sprite) when touching it'. and enabled mesh... i had to re-enable it once i'd used your image. and if size reports x, could you make a Y reporter? and instead of change size change Ystrech? another useful block is to add symbols to the letter options, and fix the glitch that special keys dont work with the yellow 'when X key pressed' reporter block. and last but not at all least, (it's the hardest) make a 'take picture and add it to the [sprite] costumes' and a 'record sound and add it to the [sprite] sounds'.
i know it's a heck lot of work, but do what you can i would greatly appreciate it!
______
LS97 'Now Minutes Ago'Wait - the YELLOW 'when X key pressed' block?!
And my mesh IS enabled...yes, the yellow reporter block from the control category [blocks]<when[]key pressed>[/blocks] doesnt work with all the special charachters you put (shift, backspace, etc). and never mind about mesh, i can always change it again! and btw, could you add a 'delete' key too?
Thanks!
______
LS97 'Now Minutes Ago'
Please dont put a fake signature in when you already have one.
Offline
LS97 wrote:
nXIII wrote:
LS97 wrote:
great thanks. another idea is a (for me) vital 'bounce off (sprite) when touching it'. and enabled mesh... i had to re-enable it once i'd used your image. and if size reports x, could you make a Y reporter? and instead of change size change Ystrech? another useful block is to add symbols to the letter options, and fix the glitch that special keys dont work with the yellow 'when X key pressed' reporter block. and last but not at all least, (it's the hardest) make a 'take picture and add it to the [sprite] costumes' and a 'record sound and add it to the [sprite] sounds'.
i know it's a heck lot of work, but do what you can i would greatly appreciate it!
______
LS97 'Now Minutes Ago'Wait - the YELLOW 'when X key pressed' block?!
And my mesh IS enabled...yes, the yellow reporter block from the control category <when[]key pressed>[/blocks] doesnt work with all the special charachters you put (shift, backspace, etc). and never mind about mesh, i can always change it again! and btw, could you add a 'delete' key too?
Thanks!
______
LS97 'Now Minutes Ago'
The special characters should work, but I can't add a delete key...
By the way, that's called a hat block.
Last edited by nXIII (2010-03-28 14:29:25)
Offline
oh well never mind about the delete key! and thanks for correcting me... i didnt know what a hat block was before
Offline
LS97 wrote:
oh well never mind about the delete key! and thanks for correcting me... i didnt know what a hat block was before
Think of it like a hat for the scripts.
Offline
nXIII wrote:
I have worked for a while and finally the elusive show/hide list blocks are in my possession!
Here's what ya gotta do:Important Note:
GirWaffles64 discovered that this will only work on a Mac if the indentations are deleted.#0: Turn fill screen off and open a browser
Open Scratch and hold shift while clicking the loop of the 'R' in the Scratch logo (the one in the top-right corner). Select 'turn fill screen off', then click in the whitespace that comes up. Select 'open...', then 'browser'.
#1: Add the showOrHideList:show: Method
Select the path 'Scratch-Objects/ScriptableScratchMorph/list ops' and copy/paste the following into the bottom panel: (Note: use Alt + V to paste in Squeak)showOrHideList: t1 show: t2
| t3 t4 t5 |
(self listVarNames includes: t1)
ifFalse: [^ self].
t3 _ lists at: t1.
t2
ifTrue: [(t4 _ self ownerThatIsA: ScratchStageMorph) ifNotNil: [t4 addMorph: t3]]
ifFalse: [t3 delete].
(t5 _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
t5 viewerPane categoryChanged: 'variables'Press Alt + S to save it.
#2: Add the showList: and hideList: Methods
Click 'list ops' again and paste the following into the bottom panel:showList: t1
| t2 |
self showOrHideList: t1 show: true.
t2 _ self ownerThatIsA: ScratchStageMorph.
t2 ~= self ifTrue: [t2 showOrHideList: t1 show: true]Press Alt + S to save it, then click 'list ops' a third time and paste the following into the bottom panel:
hideList: t1
| t2 |
self showOrHideList: t1 show: false.
t2 _ self ownerThatIsA: ScratchStageMorph.
t2 ~= self ifTrue: [t2 showOrHideList: t1 show: false]Press Alt + S.
#3: Add the correct blockSpecs
Click the 'class' button under the second-from-the-left panel and select 'block specs/blockSpecs'. Paste the following before the last two parenthesis:('show list %L' #- #showList:) ('hide list %L' #- #hideList:)
Press Alt + S and save the image (using the shift-click menu) in end-user mode.
Next time you navigate to the variable blocks page, two shiny new blocks will be there!NOTE: I have found that the argument will not (by default) show the first list. If I find a way to fix this problem, I will post an update here.
Scratch On!
You can also use a sprite to cover the list, but yeah, a block would be great.
Offline
Can anybody make a record block?
For use with the microphone?
Last edited by johnnydean1 (2010-04-09 05:46:08)
Offline
johnnydean1 wrote:
Can anybody make a record block?
For use with the microphone?
This isn't really the place, try here: http://scratch.mit.edu/forums/viewtopic.php?id=31200 But like the take picture block someone made (Can't remember who) it'll likely only bring up the record part:
Offline
I have a take a picture block if you want it!
Offline
I noticed that if you put this:
('show list %L' #- #showList: 'list') ('hide list %L' #- #hideList: 'list')
instead of this:
('show list %L' #- #showList:) ('hide list %L' #- #hideList:)
you can make the block display the word 'list' in the block by default, instead of there being 'a' in the block.
I stiumbled accross this while trying to get the dropdown box of lists in the block to display the list you created by default, instead of the 'a'
Offline
Why Is Everyone Saying It Won't Work? It Works For Me! YOU ARE MAKING ERRORS PEOPLE!!!!!!!!!!!!
Offline
Sperry wrote:
I noticed that if you put this:
('show list %L' #- #showList: 'list') ('hide list %L' #- #hideList: 'list')
instead of this:
('show list %L' #- #showList:) ('hide list %L' #- #hideList:)
you can make the block display the word 'list' in the block by default, instead of there being 'a' in the block.
I stiumbled accross this while trying to get the dropdown box of lists in the block to display the list you created by default, instead of the 'a'
Oh, yea, well, there is a way to make it display the first list, but I won't go into that... haven't opened Panther up for today yet.
Offline
Do we press enter? Or do we paste with no spaces at all?
Offline
nXIII wrote:
I have worked for a while and finally the elusive show/hide list blocks are in my possession!
Here's what ya gotta do:Important Note:
GirWaffles64 discovered that this will only work on a Mac if the indentations are deleted.#0: Turn fill screen off and open a browser
Open Scratch and hold shift while clicking the loop of the 'R' in the Scratch logo (the one in the top-right corner). Select 'turn fill screen off', then click in the whitespace that comes up. Select 'open...', then 'browser'.
#1: Add the showOrHideList:show: Method
Select the path 'Scratch-Objects/ScriptableScratchMorph/list ops' and copy/paste the following into the bottom panel: (Note: use Alt + V to paste in Squeak)showOrHideList: t1 show: t2
| t3 t4 t5 |
(self listVarNames includes: t1)
ifFalse: [^ self].
t3 _ lists at: t1.
t2
ifTrue: [(t4 _ self ownerThatIsA: ScratchStageMorph) ifNotNil: [t4 addMorph: t3]]
ifFalse: [t3 delete].
(t5 _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
t5 viewerPane categoryChanged: 'variables'Press Alt + S to save it.
#2: Add the showList: and hideList: Methods
Click 'list ops' again and paste the following into the bottom panel:showList: t1
| t2 |
self showOrHideList: t1 show: true.
t2 _ self ownerThatIsA: ScratchStageMorph.
t2 ~= self ifTrue: [t2 showOrHideList: t1 show: true]Press Alt + S to save it, then click 'list ops' a third time and paste the following into the bottom panel:
hideList: t1
| t2 |
self showOrHideList: t1 show: false.
t2 _ self ownerThatIsA: ScratchStageMorph.
t2 ~= self ifTrue: [t2 showOrHideList: t1 show: false]Press Alt + S.
#3: Add the correct blockSpecs
Click the 'class' button under the second-from-the-left panel and select 'block specs/blockSpecs'. Paste the following before the last two parenthesis:('show list %L' #- #showList:) ('hide list %L' #- #hideList:)
Press Alt + S and save the image (using the shift-click menu) in end-user mode.
Next time you navigate to the variable blocks page, two shiny new blocks will be there!NOTE: I have found that the argument will not (by default) show the first list. If I find a way to fix this problem, I will post an update here.
Scratch On!
i know the problem at the end you have to put after the code at the end 1 or 'list' i looked at the other block codes how they do it and i tried 'list' and it didnt quite work so i guess not maybe 1
Last edited by electrified123 (2010-05-25 11:42:04)
Offline
electrified123 wrote:
nXIII wrote:
I have worked for a while and finally the elusive show/hide list blocks are in my possession!
Here's what ya gotta do:Important Note:
GirWaffles64 discovered that this will only work on a Mac if the indentations are deleted.#0: Turn fill screen off and open a browser
Open Scratch and hold shift while clicking the loop of the 'R' in the Scratch logo (the one in the top-right corner). Select 'turn fill screen off', then click in the whitespace that comes up. Select 'open...', then 'browser'.
#1: Add the showOrHideList:show: Method
Select the path 'Scratch-Objects/ScriptableScratchMorph/list ops' and copy/paste the following into the bottom panel: (Note: use Alt + V to paste in Squeak)showOrHideList: t1 show: t2
| t3 t4 t5 |
(self listVarNames includes: t1)
ifFalse: [^ self].
t3 _ lists at: t1.
t2
ifTrue: [(t4 _ self ownerThatIsA: ScratchStageMorph) ifNotNil: [t4 addMorph: t3]]
ifFalse: [t3 delete].
(t5 _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
t5 viewerPane categoryChanged: 'variables'Press Alt + S to save it.
#2: Add the showList: and hideList: Methods
Click 'list ops' again and paste the following into the bottom panel:showList: t1
| t2 |
self showOrHideList: t1 show: true.
t2 _ self ownerThatIsA: ScratchStageMorph.
t2 ~= self ifTrue: [t2 showOrHideList: t1 show: true]Press Alt + S to save it, then click 'list ops' a third time and paste the following into the bottom panel:
hideList: t1
| t2 |
self showOrHideList: t1 show: false.
t2 _ self ownerThatIsA: ScratchStageMorph.
t2 ~= self ifTrue: [t2 showOrHideList: t1 show: false]Press Alt + S.
#3: Add the correct blockSpecs
Click the 'class' button under the second-from-the-left panel and select 'block specs/blockSpecs'. Paste the following before the last two parenthesis:('show list %L' #- #showList:) ('hide list %L' #- #hideList:)
Press Alt + S and save the image (using the shift-click menu) in end-user mode.
Next time you navigate to the variable blocks page, two shiny new blocks will be there!NOTE: I have found that the argument will not (by default) show the first list. If I find a way to fix this problem, I will post an update here.
Scratch On!
i know the problem at the end you have to put after the code at the end 1 or 'list' i looked at the other block codes how they do it and i tried 'list' and it didnt quite work so i guess not maybe 1
um... I kind of posted this like a year ago, I know how to make it actually display a user-created list by default. Like in Panther.
Offline
yoshidude56 wrote:
nXIII wrote:
I have worked for a while and finally the elusive show/hide list blocks are in my possession!
Here's what ya gotta do:Important Note:
GirWaffles64 discovered that this will only work on a Mac if the indentations are deleted.#0: Turn fill screen off and open a browser
Open Scratch and hold shift while clicking the loop of the 'R' in the Scratch logo (the one in the top-right corner). Select 'turn fill screen off', then click in the whitespace that comes up. Select 'open...', then 'browser'.
#1: Add the showOrHideList:show: Method
Select the path 'Scratch-Objects/ScriptableScratchMorph/list ops' and copy/paste the following into the bottom panel: (Note: use Alt + V to paste in Squeak)showOrHideList: t1 show: t2
| t3 t4 t5 |
(self listVarNames includes: t1)
ifFalse: [^ self].
t3 _ lists at: t1.
t2
ifTrue: [(t4 _ self ownerThatIsA: ScratchStageMorph) ifNotNil: [t4 addMorph: t3]]
ifFalse: [t3 delete].
(t5 _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
t5 viewerPane categoryChanged: 'variables'Press Alt + S to save it.
#2: Add the showList: and hideList: Methods
Click 'list ops' again and paste the following into the bottom panel:showList: t1
| t2 |
self showOrHideList: t1 show: true.
t2 _ self ownerThatIsA: ScratchStageMorph.
t2 ~= self ifTrue: [t2 showOrHideList: t1 show: true]Press Alt + S to save it, then click 'list ops' a third time and paste the following into the bottom panel:
hideList: t1
| t2 |
self showOrHideList: t1 show: false.
t2 _ self ownerThatIsA: ScratchStageMorph.
t2 ~= self ifTrue: [t2 showOrHideList: t1 show: false]Press Alt + S.
#3: Add the correct blockSpecs
Click the 'class' button under the second-from-the-left panel and select 'block specs/blockSpecs'. Paste the following before the last two parenthesis:('show list %L' #- #showList:) ('hide list %L' #- #hideList:)
Press Alt + S and save the image (using the shift-click menu) in end-user mode.
Next time you navigate to the variable blocks page, two shiny new blocks will be there!NOTE: I have found that the argument will not (by default) show the first list. If I find a way to fix this problem, I will post an update here.
Scratch On!
You can also use a sprite to cover the list, but yeah, a block would be great.
With the whole default value argument thing, I just told it to show a blank list menu. (Like on BYOB)
Offline
markyparky56 wrote:
johnnydean1 wrote:
Can anybody make a record block?
For use with the microphone?This isn't really the place, try here: http://scratch.mit.edu/forums/viewtopic.php?id=31200 But like the take picture block someone made (Can't remember who) it'll likely only bring up the record part:
http://img130.imageshack.us/img130/6365 … corder.png
The block does work...and I have it. It won't be on the dropdown menu of sounds when you are programming, but you can use a number. Like, whenever you add a new sound, change a variable by 1 so that you know how many sounds there are so far. Then, thell the computer to
<play sound[ <{ # of sounds }>
or
<play sound[ <{ # of sounds }> ]and wait>
Hope it helps!
Last edited by legomany3448 (2011-01-22 12:40:08)
Offline
Thank you nXIII. I was trying to make these by copying the variable stuff, but didn't know about the showOrHideList:show: method.
Offline
These work, but when it is clicked in the block pallet, it goes back to the top of the pallet. It is OK sometimes, but I have 15 variables which take up the whole thing. Is there a way to fix this?
Offline
tpaley wrote:
It doesn't work upon uploading
it's not suppost to. you can't use custom blocks in scratch projects on the website.
Offline
{Scratchblocks}
When GF clicked
Say [Sorry for disturbing, but I'm testing] for (5) secs
End
[/scratchblocks]
Offline