[Pharo-dev] About MenuModel

Stéphane Ducasse stephane.ducasse at inria.fr
Mon Nov 11 18:45:36 EST 2013


On Nov 11, 2013, at 8:24 PM, Benjamin <benjamin.vanryseghem.pharo at gmail.com> wrote:

> It used to be a block.
> 
> Now you can actually use both of them, with a subtile difference which is that the result of the block will not act one the model
> unlike a MenuModel which will add its shortcuts to the model by its own.
> 
> I will write a presentation mail this evening to explain this a bit better :)

ok please log all my stupid question for the book chapter.
And we should improve the method comments and class comment too.


> 
> Ben
> 
> On 11 Nov 2013, at 20:13, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:
> 
>> Hi Ben
>> 
>> We do not understand MenuModel
>> in the example we have 
>> 
>> 
>> 	menu := MenuModel new.
>>>> 	group1 := MenuGroupModel new.
>> 	item11 := MenuItemModel new
>> 		name: [ TimeStamp now asString  ];
>> 		enabled: [ TimeStamp now seconds even ];
>> 		yourself.
>> 		
>> 	...
>> 	model := NewListModel new.
>> 	model menu: menu
>> 
>> 
>> then on the NewListModel
>> 
>> NewListModel >> menu: aBlock
>> 	<api: #block getter: #menu registration: #whenMenuChanged:>
>> 	"Set the block used to defined the menu"
>> 	
>> 	menuHolder value: aBlock
>> 
>> so it is a block? or a MenuModel?
>> 
>> I'm totally confused.
>> 
>> Stef
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131112/8d525418/attachment-0002.html>


More information about the Pharo-dev mailing list