【问题标题】:Why won't my action's shortcut be executed?为什么我的操作的快捷方式不会被执行?
【发布时间】:2011-11-17 09:13:04
【问题描述】:

在 Moose 4.6 中,这是我的代码:

finder := GLMFinder new.
finder show: [:a | 
    a dynamic display: (GLMTextPresentation new forSmalltalk);
    act: [self halt]
    on: $k 
      entitled: 'Implementors (k)' ].

finder openOn: 'Waaaaaaa'

如果我点击这个小菜单项,就会出现一个调试器。但是,如果我按 apple-k,它不会。为什么不呢?

【问题讨论】:

    标签: smalltalk pharo moose-technology


    【解决方案1】:

    似乎动作在动态演示中效果不佳。但是,如果您将操作添加到内部演示文稿(在本例中为 GLMTextPresentation),它可以完美地工作。

    finder := GLMFinder new.
    finder show: [:a | 
        a dynamic display: 
            (GLMTextPresentation new forSmalltalk;
            act: [self halt]
            on: $k 
            entitled: 'Implementors (k)')
        ].
    
    finder openOn: 'Waaaaaaa'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-15
      • 1970-01-01
      • 2014-05-16
      相关资源
      最近更新 更多