Hi Jonathan,
If you check users of MenuModel and ListModel in the image, you get a few results that could give you an idea of how to do it. For example:
If you look for users of MenuModel you arrive to EpSelection>>filtersSubMenu, which will lead you to EpSelection>>populateMenu: aMenu. And this leads you to:
EpSelection >> initializeItemsModel
itemsModel��
multiSelection: true;
displayBlock: [ :item | item asMorph ];
childrenBlock: [ :item | self childrenItemsOf: item ];
whenSelectedItemsChanged: [ :selectedItems |��
self refreshEntryContentModelWith: selectedItems.
itemsModel menu: [ :aMenu |��
self selection populateMenu: aMenu ] ].
So apparently, the method #menu: receives a block with a menu as argument, and you have to populate it with elements.
Another way to arrive to the same conclusion is to look for senders of #menu:. There you see for example:
ChangeSorterApplication >> initializeWidgets
�� ��...
�� ��methodsListModel menu: [:menu :shifted | self messageMenu: menu shifted: shifted ].
�� ��changesListModel menu: [:aMenu :shifted | self changeSetMenu: aMenu shifted: shifted ��].
�� ��classesListModel menu: [:aMenu :shifted | self classMenu: aMenu shifted: shifted ].
�� ��...
Cheers,
Guille