Best way to open a MorphMenu?
Stefan Matthias Aust
sma at 3plus4.de
Sun Dec 19 16:09:34 UTC 1999
I tried to find the best way to setup my own popup menus for morphs.
Looking into the "control" category of MenuMorph, I found a number of
different methods. The easiest existing way seems to be #popUpAt:event:,
especially if you want to open the menu as reaction to an event. This
method is used 19 times in a 2.6 image. However, the popup position is
calculated
either
menu popUpAt: evt hand position event: evt.
or
menu popUpAt: evt cursorPoint event: evt.
or
using even stranger ways. Most of them seem to perform the same job and
could actually be replaced by either one I think (that
HandMorph/MorphicEvent stuff is too complicate to be sure). Therefore I'd
propose to add a method
popUp: evt
^ self popUpAt: evt cursorPoint event: evt
to MenuMorph and clean up the image.
bye
--
Stefan Matthias Aust // Bevor wir fallen, fallen wir lieber auf.
More information about the Squeak-dev
mailing list
|