Menus have been redone.
Now you should do something like
list menu: [ :menu | aMenu addGroup: [:aGroup |
aGroup addItem: [ :item |
item
name: 'Inspect' translated;
action: [ self inspectSelectedObjectInNewWindow ];
shortcut: $i command mac | $i alt win | $i alt unix ].
aGroup addItem: [ :item |
item
name: 'Explore' translated;
action: [ self exploreSelectedObject ];
shortcut: $i shift command mac | $i shift alt win | $i shift alt unix ] ].
HTH,
Benjamin Van Ryseghem
#
EDIT: ListModel is still using the old menus (for compatibility reason in Pharo 3.0).
A working example is
ListModel new
menu: [:m |
m
add: 'test'
target: [self halt ]
action: #value.
m ];
openWithSpec
Note that the menu block should return the menu (a limitation from PluggableListMorph that should be encapsulated)