这有效(调试器出现):
bubbler := GLMFinder new.
bubbler show: [:a |
a text
selectionPopulate: #selection
on: $k
entitled: 'Implementors (k)'
with: [ :text | text inspect. self halt]].
bubbler openOn: 'Waaaaaaa'
但这不是(没有调试器出现):
bubbler := GLMFinder new.
bubbler show: [:a |
a dynamic display: (GLMTextPresentation new forSmalltalk);
selectionPopulate: #selection
on: $k
entitled: 'Implementors (k)'
with: [ :text | text inspect. self halt]].
bubbler openOn: 'Waaaaaaa'
两者都应该做同样的事情:在文本视图中按下apple-k时停止。但是,第二个片段(使用动态演示文稿,与第一个不同)不会将操作转发到其文本演示文稿。那么,为什么呢?我们如何将动作与动态演示相关联?
答案 0 :(得分:1)
似乎动作在动态演示中效果不佳。添加selectionPopulate:on:标题:with:到内部演示文稿将起作用。
bubbler := GLMFinder new.
bubbler show: [:a |
a dynamic display:
(GLMTextPresentation new forSmalltalk;
selectionPopulate: #selection
on: $k
entitled: 'Implementors (k)'
with: [ :text | text inspect. self halt])
].
bubbler openOn: 'Waaaaaaa'