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

karl karl.ramberg at comhem.se
Sat Oct 13 10:18:59 EDT 2007


subbukk wrote:
> 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).
But if I have a menu selected to be 'stay up' I don't want it deleted if 
I make a submenu 'stay up' as well.
If I delete the rootmenu all submenus that do not have 'stay up' will be 
deleted.

I'm not sure what cause the line ending issue. I should pass changesets 
gzipped.

Karl


More information about the Etoys mailing list