简体   繁体   English

Spec中MultiColumnList中的打开菜单给出了MNU

[英]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: 在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).

Is this a bug in Spec or I am missing something? 这是Spec中的错误还是我遗漏了什么?

That is a well-known current bug in Spec. 这是Spec中一个众所周知的当前错误。 There are several places where right-clicks MNU 右键单击MNU有几个地方

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM