3

在 Pharo 3 中,使用 MultiColumnListModel 在菜单中单击鼠标右键会给出 MessageNotUnderstood,如以下示例代码所示:

| 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).

这是 Spec 中的错误还是我遗漏了什么?

4

1 回答 1

0

这是 Spec 中一个众所周知的当前错误。有几个地方右键MNU

于 2014-07-16T14:23:45.710 回答