Buttons in Morphic

Dan Shafer dshafer at yahoo.com
Sat Apr 7 18:04:25 UTC 2001


Doh!

Yep. Uses a BasicButton instead of a SimpleButton (nomenclature seems a bit out
of whack here) and everything works as expected.

Thanks, Karl.

I think this points to the real need for someone to create a kind of triage of
Morphs, focusing on the ones that are most commonly useful and what they do, so
that newbies don't look at a SimpleButtonMorph and figure it should
be...well...a simple button!

One way to do this that would be way cool would be to have a sort of Morph
Encyclopedia that listed all of the Morphs in the World and, on clicking on
one, displayed their class comments. Then if we get the class comments up to
date, we'd have a faster way to explore precisely which Morph might be best
suited to a particular kind of task.

Of course, had I browsed on "button" I'd have found there are all kinds of very
specialized-sounding buttons in Morphic. I was so focused on trying to do all
of this via direct manipulation that I managed to shut out of mind the idea of
using the browser to accelerate my understanding.
--- Karl Ramberg <karl.ramberg at chello.se> wrote:
> In tile scripting / etoy you would probably benefit from using 
> the predefined category for button actions. 
> 
> Karl
> 
> Dan Shafer wrote:
> > 
> > I've just spent several hours over the last two days delving into
> > SimpleButtonMorph and trying to understand why buttons in Morphic don't
> behave
> > the way I expected them to behave. If I have this right, it is completely
> > unclear to me how buttons are _suppsoed_ to be used in Morphic.
> > 
> > Here's what I _think_ I've learned.
> > 
> > A SimpleButtonMorph appears to "eat" the usual mouse events: mouseDown,
> > mouseUp, and mouseStillDown. It has a default "flash" behavior that it
> executes
> > on mouseUp. Even though its halo menu has an item called "add mouseUp
> action,"
> > doing so seems to have no discernible effect. Neither, for that matter,
> does
> > "remove mouseUp action." You can write a script for such a button, set it
> to
> > active on mouseUp and you can click on that sucker until your hand breaks
> and
> > nothing is going to happen. This despite the fact that when you click on
> the
> > instant-execution yellow exclamation point in the script tile, the script
> runs
> > exactly as expected every time.
> > 
> > I conclude, at least tentatively, that the intent is that
> SimpleButtonMorphs
> > are _not_ supposed to be buttons in the sense that _I_ at least have come
> to
> > think of them: pluggable widgets that you attach to a script to execute. It
> > appears to me that one would have to do some development that did not
> involve
> > only direct manipulation of Morphs to make a SimpleButtonMorph behave as I
> > expected.
> > 
> > Please note that I am neither complaining nor suggesting that my
> expectation
> > should carry the day. I am only trying to understand the reasoning behind
> the
> > design and intended use of these seductive little buttons that are so
> stubborn
> > in my world-view!
> > 
> > I have resorted to creating my own button-like objects out of rectangles
> and
> > text and which therefore have no default behaviors or assumptions about
> what
> > they will or will not do when clicked. As I am writing a tutorial based on
> this
> > experience, I obviously prefer to be right so if this is wrong-headed,
> someone
> > please tell me!
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Get email at your own domain with Yahoo! Mail.
> > http://personal.mail.yahoo.com/
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/





More information about the Squeak-dev mailing list