[Pharo-dev] How to get menu popping up

Benjamin benjamin.vanryseghem.pharo at gmail.com
Mon Nov 11 14:48:15 EST 2013


What is classesListModel ?

Ben

On 11 Nov 2013, at 20:17, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:

> We are trying to fix the ChangeSorter because the menu are broken.
> So we did 
> 
> ChangeSorterApplication>>changeSetMenu1: aMenu shifted: isShifted 
> 	"Set up aMenu to hold commands for the change-set-list pane.  This could be for a single or double changeSorter"
> 	
> 	aMenu title: 'Change Set'.
> 	self changeSetMenu1NewGeneration: aMenu.
> 
> ChangeSorterApplication>>changeSetMenu1NewGeneration: aMenuModel
> 		
> 	| group1 menuItem |
> 	menuItem := MenuItemModel new
> 		name: [ TimeStamp now asString  ];
> 		enabled: [ TimeStamp now seconds even ];
> 		yourself.
> 		
> 	group1 := MenuGroupModel new.	
> 	group1 autoRefresh: true.
> 	
> 	aMenuModel
> 		addMenuGroup: group1.
> 	self classesListModel menu: aMenuModel.
> 		
> 
> but the menu does not pop up.
> 
> We tried to understand NewListModel but we could not understand how the new menu supposed to work
> The example
> 
> exampleWithMenu
> 	"self exampleWithMenu"
> 	….
> 	model := NewListModel new.
> 	model menu: menu.
> 	model openWithSpec
> 
> but this is not how it works with a list.
> So how do we use the new menu?
> 
> 
> Stef

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131111/6902d69f/attachment-0002.html>


More information about the Pharo-dev mailing list