Morphic events and the pervasive meta-menu

Chris Muller afunkyobject at yahoo.com
Sat Jan 19 19:34:24 UTC 2002


I am implementing a morph I wish to interact with
using the red button with combinations of shift and
control key (including shifted and controlled).

However, I am disrupted by the "meta-menu" when using
the control key.  It consumes both the controlled+red
AND a controlled+yellow.  Being a newbie, just when I
thought I had become familiar with the GENEROUS
PLETHORA of various menus available for a single
morph, I have discovered another one.

I decided to take control of the controlled+red
button, which requires me to override
Morph>>handleMouseDown: anEvent.  This is not a widely
overridden method, and, just as I am ready to copy the
code down, I thought it worth asking whether it is
necessary for the meta-menu, chock full of redundancy
with halos and other menus, really needs to consume
both the controlled+red and controlled+yellow.  Can we
make it just for the controlled+yellow in Morph?

In my first implementation attempt, I tried a simple
guard that checks anEvent's yellowButtonPressed.  That
didn't work.  For some reason, it thinks the
yellowButtonPressed at that time, no matter what
button you actually pressed.

I didn't want Sensor to guard it, because of possible
timing issues, but it might be the simplest solution.


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/



More information about the Squeak-dev mailing list