Discuss Scratch

Me_Tis
Scratcher
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:
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)


See my 3D project or my masterpiece: Brain-Twist 3
PullJosh
Scratcher
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
Scratcher
1000+ posts

"Create own block" dropdown list

Support, doesn't seem to be any duplicates, so nice original idea!

My browser / operating system: MacOS Macintosh X 10.8.5, Chrome 29.0.1547.76, Flash 11.8 (release 800)
cobraguy
Scratcher
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
Scratcher
500+ posts

"Create own block" dropdown list

Me_Tis wrote:

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]
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]
I would find this very useful (though admittedly my example wasn't very useful)
Any suggestions, improvements or just support?
%d They will be added in future!
epiclyepicepic
Scratcher
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
Scratcher
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
Scratcher
1000+ posts

"Create own block" dropdown list

Support! Good idea!

PullJosh wrote:

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!
BYOB is now called SNAP? (off topic)


spgame05
Scratcher
100+ posts

"Create own block" dropdown list

Support!

Deerleg wrote:

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

Last edited by spgame05 (May 7, 2014 01:58:57)

derpmeup
Scratcher
1000+ posts

"Create own block" dropdown list

Support! There is a way to get hacked custom blocks, but it isn't easy.

hey bro that's a pretty good meme xD!
TimothyLawyer
Scratcher
1000+ posts

"Create own block" dropdown list

Me_Tis wrote:

Any suggestions, improvements or just support?
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]

BeetleBlocks, WatercolorBot, and Turtle Art
Hover over a name or label to translate into current language
When Earth was… Purple?

☂️




c1ff
Scratcher
58 posts

"Create own block" dropdown list

Yes Yes Yes Yes Yes Yes Yes Yes YES!!!!!!!!!!!!

I supports this cause!

say [YES!!!!!] for (inf.) secs

Scratch is great, but sometimes I need to post my projects in Python or Lua.
https://github.com
My github username is C1ffisme.
Me_Tis
Scratcher
100+ posts

"Create own block" dropdown list

Yay! Lots of support!!!

See my 3D project or my masterpiece: Brain-Twist 3
Me_Tis
Scratcher
100+ posts

"Create own block" dropdown list

TimothyLawyer wrote:

Me_Tis wrote:

Any suggestions, improvements or just support?
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]
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…

See my 3D project or my masterpiece: Brain-Twist 3
Swampert11
Scratcher
1000+ posts

"Create own block" dropdown list

Support!

Do you know a good project that doesn't have a lot of attention? Suggest a project to be put in this studio that is unpopular.
___________________________________________________________________________________

Only a Scratcher <——– Please look at it!
___________________________________________________________________________________

;












AonymousGuy
Scratcher
1000+ posts

"Create own block" dropdown list

+1.

Last edited by AonymousGuy (May 7, 2014 22:36:26)

TimothyLawyer
Scratcher
1000+ posts

"Create own block" dropdown list

Me_Tis wrote:

TimothyLawyer wrote:

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]
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…

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] ▾ 






move [down v] ::custom
ScratchBlocks doesn't support v for a drop-down menu for the define block.

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

BeetleBlocks, WatercolorBot, and Turtle Art
Hover over a name or label to translate into current language
When Earth was… Purple?

☂️




Failord
Scratcher
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.

Thanks for the ride, Scratch Team and community! Unfortunately, the time has come for me to move on from Scratch, so I'll no longer be using the forums. Thanks again, and farewell!
Invisible text! This will show you if a profile I claim to be mine IS mine. Just remember to visit the profile and see if I confirmed in the comments.
For old time's sake, see the revolutionary Laser Battle 2.0! Also see Unstoppable Game!

And no, the evil kumquats didn't alter my signature…
Me_Tis
Scratcher
100+ posts

"Create own block" dropdown list

TimothyLawyer wrote:

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)


See my 3D project or my masterpiece: Brain-Twist 3
AonymousGuy
Scratcher
1000+ posts

"Create own block" dropdown list

Should they maybe be called enumerations, like they are in real programming languages?

Powered by DjangoBB