user869097
user869097

Reputation: 1362

Opening menu in a MultiColumnList in Spec gives MNU

In Pharo 3 right-clicking in a menu using a MultiColumnListModel gives a MessageNotUnderstood, as shown in this example code:

| specModel list itemMenu group1 item1 |

itemMenu := MenuModel new.
item1 := MenuItemModel new
    name: 'Browse';
    shortcut: $b command;       
    enabled: true;
    action: [ self halt ];
    yourself.
group1 := MenuGroupModel new
    addMenuItem: item1;
    autoRefresh: true;
    yourself.
itemMenu addMenuGroup: group1.

specModel := DynamicComposableModel new
    instantiateModels: #(list MultiColumnListModel);
    yourself.
list := specModel list
    items: {$a. $b. $c. $d. $f.};
    displayBlock: [:e | {e asString. e isVowel asString} ];
    menu: itemMenu;
    yourself.
specModel
    openWithSpecLayout: (SpecLayout composed
        newRow: [: r | r add: #list ];
        yourself).

Is this a bug in Spec or I am missing something?

Upvotes: 3

Views: 84

Answers (1)

Stephan Eggermont
Stephan Eggermont

Reputation: 15917

That is a well-known current bug in Spec. There are several places where right-clicks MNU

Upvotes: 0

Related Questions