[Etoys] [FIX]MenuMorph>>delete Re: pinup issues

subbukk subbukk at gmail.com
Sat Oct 13 09:59:25 EDT 2007


On Saturday 13 October 2007 5:24 pm, Karl wrote:
> The fix with your suggestion added
That was quick! The pinning works as expected now. Thanks.

1. The activeSubMenu and delete diffs come out squished in a single line (due 
to the usage of \n (0x0a) instead of \r as a line terminator).
2. The stayUp fix refers to rootMenu. If menus are nested more than two 
levels, then won't a parent Menu be different from rootMenu? A simpler way 
would be to use a guarded delete method like:
dismiss
	self parentMenu ifNotNil: [ self parentMenu dismiss].
	stayUp ifFalse: [ self delete ].

parentMenu:
	popUpOwner ifNil: [ ^nil ].
	^popUpOwner owner.

Now we can safely dismiss any menu without having to peek into their stayUp 
status. This could benefit submenus like layout (whose submenus should be 
made pinnable).

Subbu


More information about the Etoys mailing list