Jannik
I'm doing it because this is exactly done like that in menuMorph:
everything falls down to
addToggle: aString target: anObject selector: aSymbol getStateSelector:
stateSymbol enablementSelector: enableSymbol argumentList: argList
"Append a menu item with the given label. If the item is selected, it
will send the given selector to the target object."
|item|
item := ToggleMenuItemMorph new
contents: aString;
target: anObject;
selector: aSymbol;
arguments: argList;
getStateSelector: stateSymbol;
enablementSelector: enableSymbol.
^ self addMenuItem: item.
:)
On Mar 11, 2013, at 9:36 PM, stephane ducasse <[email protected]> wrote:
> Thanks Jannik.
> I was thinking that
> - we could have a different MenuItem class: ValuedMenuItem
> - that a add:value: in MenuMorph could create an instance of this
> ValuedMenuItem
>
> Like that we can integrate both nicely.
>
> What do you think?
>
> Stef
>
> On Mar 11, 2013, at 9:33 PM, jannik.laval <[email protected]> wrote:
>
>> <MenuMorphNG.st>
>
>