How can I add a menu to a list model with decent actions?
I've seen some code like:
list menu: [ :menu |
menu
add: 'Name'
action: [ "some action" ].
but when I do this I get an error because the block is not evaluated but sent as a message to something else…
Are there any guidelines for menus?
Menus have been redone.
Now you should do something like
HTH,
Benjamin Van Ryseghem
#EDIT: ListModel is still using the old menus (for compatibility reason in Pharo 3.0). A working example is
Note that the menu block should return the menu (a limitation from PluggableListMorph that should be encapsulated)