Discuss Scratch
- Discussion Forums
- » Suggestions
- » "Create own block" dropdown list
- Me_Tis
-
100+ posts
"Create own block" dropdown list
My suggestion is simple: that when you create your own block, along with boolean, string and number input, you were allowed to do a dropdown list like this:
You would create it like this:
https://www.dropbox.com/s/4t3sqpemud3e0y1/Dropdown%20list.png?dl=0
I would find this very useful (though admittedly my example wasn't very useful)
Any suggestions, improvements or just support?
PS this can be likened to enums in other programming languages.
UPDATE:
I know that this is possible through workarounds, but the entire premise behind scratch is to make programming easy, so a workaround isn't really a solution.
I am suggesting this because I think it will make some things easier, whereas using the workaround makes things harder, and may be intimidating to new programmers.
define move [direcion]▾
if <(direction)=[up]>
point in direction (0 v)
move (10) steps
end
if <(direction)=[down]>
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down v]
You would create it like this:
https://www.dropbox.com/s/4t3sqpemud3e0y1/Dropdown%20list.png?dl=0
I would find this very useful (though admittedly my example wasn't very useful)
Any suggestions, improvements or just support?
PS this can be likened to enums in other programming languages.
UPDATE:
I know that this is possible through workarounds, but the entire premise behind scratch is to make programming easy, so a workaround isn't really a solution.
I am suggesting this because I think it will make some things easier, whereas using the workaround makes things harder, and may be intimidating to new programmers.
Last edited by Me_Tis (Nov. 18, 2017 12:38:08)
- PullJosh
-
1000+ posts
"Create own block" dropdown list
Great idea! This was a feature that I always found BYOB (now SNAP) was lacking and needed badly. And now scratch needs it too. Support!
- DotDash
-
1000+ posts
"Create own block" dropdown list
Support, doesn't seem to be any duplicates, so nice original idea! 

- cobraguy
-
1000+ posts
"Create own block" dropdown list
Support! Just need to come up with a menu that lets edit the values for the dropdown.
Last edited by cobraguy (Oct. 28, 2013 13:17:53)
- BigBlueBlock
-
500+ posts
"Create own block" dropdown list
%d They will be added in future! My suggestion is simple: that when you create your own block, along with boolean, string and number input, you were allowed to do a dropdown list like this:define move [direcion]I would find this very useful (though admittedly my example wasn't very useful)
if <(direction)=[up]>
point in direction (0 v)
move (10) steps
end
if <(direction)=[down]>
point in direction (180 v)
move (10) steps
end
when green flag clicked
move [down v]
Any suggestions, improvements or just support?
- epiclyepicepic
-
18 posts
"Create own block" dropdown list
I have seen people do it. I can do a number drop down box but thats it!
cked
when random things happen[scratchblocks]
r[/scratchblocks]
do more random things!
- chabad360
-
20 posts
"Create own block" dropdown list
funny that was a suggestion I bought up a while ago along with the custom blocks being global meaning they can be declared once but used in every sprite.
- Deerleg
-
1000+ posts
"Create own block" dropdown list
Support! Good idea!
BYOB is now called SNAP? (off topic) Great idea! This was a feature that I always found BYOB (now SNAP) was lacking and needed badly. And now scratch needs it too. Support!
- spgame05
-
100+ posts
"Create own block" dropdown list
Support! 


Yep! BYOB is now called SNAP? (off topic)

Last edited by spgame05 (May 7, 2014 01:58:57)
- derpmeup
-
1000+ posts
"Create own block" dropdown list
Support! There is a way to get hacked custom blocks, but it isn't easy. 

- TimothyLawyer
-
1000+ posts
"Create own block" dropdown list
Support. Any suggestions, improvements or just support?
The Unicode white down-pointing small triangle (U-25BF) could be used to indicate the dropdown variable.
define move [direction ▿]
if <(direction ▿)=[up]>
point in direction (0 v)
end
if <(direction ▿)=[down]>
point in direction (180 v)
end
move (10) steps
when green flag clicked
move [up v]
move [down v]
- c1ff
-
58 posts
"Create own block" dropdown list
Yes Yes Yes Yes Yes Yes Yes Yes YES!!!!!!!!!!!!
I supports this cause!
I supports this cause!

say [YES!!!!!] for (inf.) secs
- Me_Tis
-
100+ posts
"Create own block" dropdown list
Makes sense… the only thing is that although the input method for a dropdown input would be different it would behave pretty much like a string, so maybe it doesn't need an arrow symbol.. Although if this makes it easier to understand for beginners then I guess so…Support. Any suggestions, improvements or just support?
The Unicode white down-pointing small triangle (U-25BF) could be used to indicate the dropdown variable.define move [direction ▿]
if <(direction ▿)=[up]>
point in direction (0 v)
end
if <(direction ▿)=[down]>
point in direction (180 v)
end
move (10) steps
when green flag clicked
move [up v]
move [down v]
- AonymousGuy
-
1000+ posts
"Create own block" dropdown list
+1.
Last edited by AonymousGuy (May 7, 2014 22:36:26)
- TimothyLawyer
-
1000+ posts
"Create own block" dropdown list
Makes sense… the only thing is that although the input method for a dropdown input would be different it would behave pretty much like a string, so maybe it doesn't need an arrow symbol.. Although if this makes it easier to understand for beginners then I guess so… The Unicode white down-pointing small triangle (U-25BF) could be used to indicate the dropdown variable.define move [direction ▿]
if <(direction ▿)=[up]>
point in direction (0 v)
end
if <(direction ▿)=[down]>
point in direction (180 v)
end
move (10) steps
when green flag clicked
move [up v]
move [down v]
True.
When I saw your example it helped me to think about how this could be done.
define move [direction]
gave me an expectation of
move [ ] ::custom
//or
move () ::custom
but not
move [down v] ::custom
as the block it would define.
So a new solution occurs to me.
define move [direction] ▾ScratchBlocks doesn't support v for a drop-down menu for the define block.
move [down v] ::custom
So the v is Unicode black down-pointing small triangle (U+25BE).
Clicking on the ▾ in the define block (where it's white) would show a menu of lists.
Select a list and the items of the list become the options in the drop-down menu in the custom block.
A blank list item would produce a non-selectable separator line (the black bar).
A list item of the form (number) string would produce menu options like in the direction block.
Thus, each drop-down menu in a custom block would be defined by a Scratch list.
Easy-peasy

- Failord
-
1000+ posts
"Create own block" dropdown list
You can actually hack to do this, (don't ask me how) but the hack doesn't let you do anything with it. There's also the problem of filling up the dropdown, assuming they non-hack implement it. For now, reporters and strings work fien.
If we can get a good, simple way for this to be added, then you have my support.
If we can get a good, simple way for this to be added, then you have my support.
- Me_Tis
-
100+ posts
"Create own block" dropdown list
I think your suggestion is almost perfect. The only thing I disagree with is having the create a block reliant on a scratch list. I was thinking more of a menu similar to the current “create a block” menu - like this:
https://dl.dropboxusercontent.com/u/17754076/Scratch/Dropdown%20list.png
Last edited by Me_Tis (May 9, 2014 17:20:32)
- AonymousGuy
-
1000+ posts
"Create own block" dropdown list
Should they maybe be called enumerations, like they are in real programming languages?
- Discussion Forums
- » Suggestions
-
» "Create own block" dropdown list