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

#1 2012-02-07 19:31:45

egdx
New Scratcher
Registered: 2012-02-07
Posts: 1

if else

I'd like to simplify the widgets on the control tab.

I'd like to get rid of the if widget,
to replace that with the if-else widget throughout.
(This would be a compatible change)


Because there's alawys this else case.
And this is actually what we want to teach the kids.
So that they should alway think the other way around.

But my prime complaint is,
that it's currently extremly hard to add an else case
to a preexisting "if" at all.

I did experience that myself.

So the "if" does teach the kids about conditionals,
but they need a very easy way to extend that to the other case.

I suggest to amalgate the if and if/else widget into one.

From my experience as a software developer,
that widget should be if/else erveywhere.

I believe this could even improve the kids experience.
Because no kid does understand why something should happen only if,
but they all do ask what should happen else.

~eike

Offline

 

#2 2012-02-07 19:38:12

danwoodski
Scratcher
Registered: 2009-12-23
Posts: 100+

Re: if else

egdx wrote:

I'd like to simplify the widgets on the control tab.

I'd like to get rid of the if widget,
to replace that with the if-else widget throughout.
(This would be a compatible change)


Because there's alawys this else case.
And this is actually what we want to teach the kids.
So that they should alway think the other way around.

But my prime complaint is,
that it's currently extremly hard to add an else case
to a preexisting "if" at all.

I did experience that myself.

So the "if" does teach the kids about conditionals,
but they need a very easy way to extend that to the other case.

I suggest to amalgate the if and if/else widget into one.

From my experience as a software developer,
that widget should be if/else erveywhere.

I believe this could even improve the kids experience.
Because no kid does understand why something should happen only if,
but they all do ask what should happen else.

~eike

Two things:
1. This probably belongs in Suggestions (you might not be able to post there, though)
2. I think the reason the Scratch Team hasn't done this already is because the If block is faster, and takes up quite a bit less space in long scripts needing only the If part.
Removing the If block simply isn't worth the time or effort...


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://dl.dropbox.com/u/12506914/Pics/p2e-2.png&link2=http://dl.dropbox.com/u/12506914/Pics/ms.png&link3=http://dl.dropbox.com/u/12506914/Pics/block%20lib.png
Starting to move on to other languages, but I'll still be around from time to time  smile

Offline

 

#3 2012-02-07 21:52:47

zippynk
Scratcher
Registered: 2011-07-23
Posts: 500+

Re: if else

Well, I don't reccomend it, but if you really want it for yourself, I modified the source code to remove the

if <something>
  do something
end
block. You can download it here.

Last edited by zippynk (2012-02-07 21:54:05)


https://dl.dropbox.com/u/60598636/trifocal_interlude_soundcloud_button.png

Offline

 

#4 2012-02-08 17:27:50

scratchisthebest
Scratcher
Registered: 2009-02-08
Posts: 500+

Re: if else

Why not just a option in the right-click menu to change an if to an if-else?


bye 1.4, we all loved you. but we all outgrew the site. 2.0 is a welcome change.
http://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.pnghttp://scratch.mit.edu/img/Pico3-med.png

Offline

 

#5 2012-02-09 18:46:37

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: if else

we need the if-else blocks!!!!! i use it all the time!


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

Board footer