MenuMorph pops up but not down
Trygve Reenskaug
trygver at ifi.uio.no
Thu Feb 5 09:35:35 UTC 2004
Many thanks to Andreas and Hernan.
I have made my own subclasses of Diagram and HJPasteUpMorph. I can set up
aClassShape on my Canvas, the menu is OK on this shape. I set up aRole, my
own subclass of JacarandaShape. The menu stays up.
The ActiveHand mouseFocus is indeed nil, so the trouble seems to be here.
I have studied the owner chain of aClassShape and aRole, they are
corresponding. I have carefully stepped through opening menus for both
shapes and made a few "irrelevant" changes along the way. I now understand
input and output better than before, an essential part of my training.
------------------------------------------------------------
!!And incidentally, both menus now pop up and down properly!!
-------------------------------------------------------------
I'll spend a few more hours to pin down what is really the difference and
report any interesting results.
All the best
--Trygve
At 03.02.2004 22:30, you wrote:
>Try this:
>
>MenuMorph example popUpInWorld: World.
>
>(will go away when you click anywhere) vs.
>
>MenuMorph example popUpInWorld: World.
>ActiveHand mouseFocus: nil.
>
>(will stay up when you click somewhere else)
>
>So most likely you're changing the mouse focus someplace else.
>
> - Andreas
>
>----- Original Message -----
>From: "Trygve Reenskaug" <trygver at ifi.uio.no>
>To: <squeak-dev at lists.squeakfoundation.org>
>Sent: Tuesday, February 03, 2004 9:26 PM
>Subject: MenuMorph pops up but not down
>
>
> > I'm working on a variant of Jacaranda to be used for reverse engineering
>of
> > Squeak systems. I create a MenuMorph and fill it with entries. I then say
> > aMenu popUpEvent: evt in: self world.
> > evt wasHandled: true.
> > (I subclass JacarandaShape and the invokeMenu: evt method is actually in
> > the superclass. I try to do the same as in an existing subclass,
> > ClassShape, but my menu stays up so I have to close it manually. I have
> > inspected the menu, and its stayUp variable = false when i inspect it.)
> >
> > Is this a known novice problem?
> >
> > Thanks
> > --Trygve
> >
> > --
> >
> > Trygve Reenskaug mailto: trygver at ifi.uio.no
> > Morgedalsvn. 5A http://heim.ifi.uio.no/~trygver
> > N-0378 Oslo Tel: (+47) 22 49 57 27
> > Norway
> >
> >
> >
--
Trygve Reenskaug mailto: trygver at ifi.uio.no
Morgedalsvn. 5A http://heim.ifi.uio.no/~trygver
N-0378 Oslo Tel: (+47) 22 49 57 27
Norway
More information about the Squeak-dev
mailing list
|