Menu positioning

Frank Caggiano frankcag at crystal-objects.com
Fri Dec 10 16:40:44 UTC 2004


On Dec 8, 2004, at 23:51, Ingo Hohmann wrote:
>
> Menu>>popUpEvent: evt in: aWorld
> 	"Present this menu in response to the given event."
>
> 	| aHand aPosition |
> 	aHand := evt ifNotNil: [evt hand] ifNil: [ActiveHand].
> 	aPosition := (aHand position truncated) - (10 at 0).
> 	Transcript show: aPosition;cr.
> 	^ self popUpAt: aPosition forHand: aHand in: aWorld
>
>
> (which at least is used, when opening the world menu, but it seems it 
> isn't used for the right click menu).
>
> I added the "- (10 at 0)" part, and after that the menu doesn't open any 
> longer.
>
> Any ideas on what is going on? (This is a 3.9 alpha image, by the way).


This is interesting because the change does work (sort of) in 3.8gamma. 
  (By the way the class is MenuMorph, no?)

In 3.8g the menu comes up in the new position but it doesn't stay up if 
you release the mouse button. If you keep the mouse button down you can 
move through the menu selecting menu items and the item selected when 
the mouse button is released is launched.

This 3.8 behavior also appears back in 3.6.

regards

----------------------------------
Frank Caggiano
frank at crystal-objects dot com
http://www.crystal-objects.com

The best education for the best is the best education for all.
					Robert Maynard Hutchins




More information about the Squeak-dev mailing list