This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-03-20 10:26:23

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

The Elusive Show/Hide List Blocks

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!

Last edited by nXIII (2010-03-25 20:27:15)


nXIII

Offline

 

#2 2010-03-20 10:28:44

GirWaffles64
Scratcher
Registered: 2009-08-09
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Cool! Can't wait to try it and add it to my source code mods!


hey kiddoes i'm back

Offline

 

#3 2010-03-20 10:35:35

Greenboi
Scratcher
Registered: 2010-01-30
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Yeah! looks really great!

Offline

 

#4 2010-03-20 11:17:48

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Does it work upon uploading? Does it work when you download it from the scratch site?


http://i.imgur.com/WBkM2QQ.png

Offline

 

#5 2010-03-20 11:19:30

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Lucario621 wrote:

Does it work upon uploading? Does it work when you download it from the scratch site?

I'm about to find out.

EDIT: "nothing more expected"  keeps coming up, and I can't save the thing? I get a menu that says :
unknown variable: nothing please correct, or cancel:
declare global
string
noteevent
remotestring
cancel

Last edited by juststickman (2010-03-20 11:24:35)


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#6 2010-03-20 15:38:42

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

juststickman wrote:

Lucario621 wrote:

Does it work upon uploading? Does it work when you download it from the scratch site?

I'm about to find out.

EDIT: "nothing more expected"  keeps coming up, and I can't save the thing? I get a menu that says :
unknown variable: nothing please correct, or cancel:
declare global
string
noteevent
remotestring
cancel

What step are you on?


nXIII

Offline

 

#7 2010-03-20 15:52:51

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Can you just upload the Squeak image? I'm far too lazy.


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#8 2010-03-20 15:58:52

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Nevermind. I overcame my laziness, and even uploaded a project to test them in Java.


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#9 2010-03-20 15:59:59

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Yep. Java obviously doesn't work.

But I'm gonna decompile the JAR, and poke around, see how it works.


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#10 2010-03-20 16:02:02

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

gershmer wrote:

Yep. Java obviously doesn't work.

But I'm gonna decompile the JAR, and poke around, see how it works.

Nice  big_smile
I would just show you the image, but it has like 15 other blocks in it too...


nXIII

Offline

 

#11 2010-03-20 18:42:59

rocket101
Scratcher
Registered: 2009-08-21
Posts: 500+

Re: The Elusive Show/Hide List Blocks

Cool! I will use this!

Offline

 

#12 2010-03-20 18:46:30

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

nXIII wrote:

gershmer wrote:

Yep. Java obviously doesn't work.

But I'm gonna decompile the JAR, and poke around, see how it works.

Nice  big_smile
I would just show you the image, but it has like 15 other blocks in it too...

I wouldn't mind more goodies!  big_smile


http://i.imgur.com/8LX1NrV.png

Offline

 

#13 2010-03-20 18:57:52

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Cool! I can't pretend I'm not a little disappointed though... I tried this EXACT SAME CODE AND PROCEDURE yesterday and I ALMOST HAD IT!!!! I just forgot to use ScratchStageMorph. Actually I tried using it, but I forgot to insert it into one of the categories (I think it was "ShoworHide").

Offline

 

#14 2010-03-21 05:01:58

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

nXIII wrote:

juststickman wrote:

Lucario621 wrote:

Does it work upon uploading? Does it work when you download it from the scratch site?

I'm about to find out.

EDIT: "nothing more expected"  keeps coming up, and I can't save the thing? I get a menu that says :
unknown variable: nothing please correct, or cancel:
declare global
string
noteevent
remotestring
cancel

What step are you on?

I was saving the first thing.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#15 2010-03-21 11:35:26

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

juststickman wrote:

nXIII wrote:

juststickman wrote:


I'm about to find out.

EDIT: "nothing more expected"  keeps coming up, and I can't save the thing? I get a menu that says :
unknown variable: nothing please correct, or cancel:
declare global
string
noteevent
remotestring
cancel

What step are you on?

I was saving the first thing.

Odd... you DO have 1.4, right?


nXIII

Offline

 

#16 2010-03-21 11:43:42

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

nXIII wrote:

juststickman wrote:

nXIII wrote:


What step are you on?

I was saving the first thing.

Odd... you DO have 1.4, right?

Yup.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#17 2010-03-21 11:57:16

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

juststickman wrote:

nXIII wrote:

juststickman wrote:


I was saving the first thing.

Odd... you DO have 1.4, right?

Yup.

Do you have a Mac?

Offline

 

#18 2010-03-21 13:56:48

steppenwulf
Scratcher
Registered: 2009-07-23
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

That's cool, even though I don't know why I would need those blocks.


I'm graduating HS this April and going to college in the Fall.

Offline

 

#19 2010-03-23 09:49:50

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

IT DOESN'T WORK!
i cant get past the first scripting part!!!
sad


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#20 2010-03-23 12:12:39

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

The-Whiz wrote:

juststickman wrote:

nXIII wrote:

Odd... you DO have 1.4, right?

Yup.

Do you have a Mac?

Yup.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#21 2010-03-23 15:18:54

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

markyparky56 wrote:

IT DOESN'T WORK!
i cant get past the first scripting part!!!
sad

1.4? Are you sure the pasted copy looks exactly like the real one?


nXIII

Offline

 

#22 2010-03-23 15:29:32

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

I'm gonna do it later. If it works, I love you! xD


Hai.

Offline

 

#23 2010-03-23 15:43:38

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Here is a demonstration. If yours don't work like this, tell me and I will re-paste the scripts.

Last edited by nXIII (2010-03-23 15:44:29)


nXIII

Offline

 

#24 2010-03-23 16:02:32

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

nXIII wrote:

Here is a demonstration. If yours don't work like this, tell me and I will re-paste the scripts.

Cool!


http://i.imgur.com/WBkM2QQ.png

Offline

 

#25 2010-03-23 16:12:10

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: The Elusive Show/Hide List Blocks

Please upload the image...


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

Board footer