Discuss Scratch
- Discussion Forums
- » Suggestions
- » Easier switching between "if" and "if/else" blocks
- PhirripSyrrip
-
500+ posts
Easier switching between "if" and "if/else" blocks
I've been in the situation so many times when I make an “if” statement complete with a condition and some blocks inside it, only to realise that an “if/else” statement would be much more appropriate. But to make the switch, I have to remove the condition, remove the blocks inside the statement, add the if/else block and add back the blocks that were in the “if” statement. In practice, this exchange only takes about 10 seconds, but if you're like me and you constantly fail to think ahead, it does get annoying to constantly make this change, and I've thought of a simple shortcut that could be added to make our lives easier.
In the same way that you can switch from the () + () block to the () - () block, the switch would be made by right-clicking the “if” block and from the menu that appears, there is the option “if/else” as shown:

The “if” block would then “grow” into an “if/else” block.
If you right click on an “if/else” block and want to turn it back into an “if” block, then any blocks that were in the “else” section would “pop” out, just like reporter and boolean blocks pop out if you place another reporter/boolean on top of it.
This same idea can also be used to turn “<<> and <>>” blocks into “<<> or <>>” blocks and vice versa as well as switching between “hide” and “show” blocks.
In the same way that you can switch from the () + () block to the () - () block, the switch would be made by right-clicking the “if” block and from the menu that appears, there is the option “if/else” as shown:

The “if” block would then “grow” into an “if/else” block.
If you right click on an “if/else” block and want to turn it back into an “if” block, then any blocks that were in the “else” section would “pop” out, just like reporter and boolean blocks pop out if you place another reporter/boolean on top of it.
This same idea can also be used to turn “<<> and <>>” blocks into “<<> or <>>” blocks and vice versa as well as switching between “hide” and “show” blocks.
Last edited by PhirripSyrrip (Nov. 3, 2013 10:27:53)
- ProdigyZeta7
-
1000+ posts
Easier switching between "if" and "if/else" blocks
I indeed fortify this indubitable plan.
- xlk
-
100+ posts
Easier switching between "if" and "if/else" blocks
YES, nothing worse than passing loads of stuff from an if to an if/else….
- mathfreak231
-
1000+ posts
Easier switching between "if" and "if/else" blocks
ZUMG. YES. Mainly because the other blocks do that…
- A-no-meep
-
100+ posts
Easier switching between "if" and "if/else" blocks
This would be a good idea
- blob8108
-
1000+ posts
Easier switching between "if" and "if/else" blocks
Yes, there should be lots more “switch this block”-style menus. Such as show/hide.
- PhirripSyrrip
-
500+ posts
Easier switching between "if" and "if/else" blocks
Ah yes, that's a good one. Yes, there should be lots more “switch this block”-style menus. Such as show/hide.
- turkey3_test
-
1000+ posts
Easier switching between "if" and "if/else" blocks
Definately! I always have to move it out and into the new loop.
- mitchboy
-
1000+ posts
Easier switching between "if" and "if/else" blocks
i haven't supported this yet? support!
- kspiegs
-
95 posts
Easier switching between "if" and "if/else" blocks
I was thinking the same thing! +support!
- BigBlueBlock
-
500+ posts
Easier switching between "if" and "if/else" blocks
I see this as very useful, support.
- mathfreak231
-
1000+ posts
Easier switching between "if" and "if/else" blocks
bump because someone else just suggested this
- Discussion Forums
- » Suggestions
-
» Easier switching between "if" and "if/else" blocks