我有一个包含多个控件的Spec窗口。当我点击“确定”按钮时,我希望窗口关闭。
| m |
m := DynamicComposableModel new.
m instantiateModels: #(text TextModel ok OkToolbar).
m ok okAction: [ self close ].
m openWithSpecLayout: (SpecLayout composed
newColumn: [ : c | c add: #text ; add: #ok height: 30 ];
yourself).
我尝试过发送删除和关闭,但都没有用。我该如何关闭窗户?
答案 0 :(得分:3)
你可以这样做:
| m |
m := DynamicComposableModel new.
m instantiateModels: #(text TextModel ok OkToolbar).
m ok okAction: [ m window close ].
m openWithSpecLayout: (SpecLayout composed
newColumn: [ : c | c add: #text ; add: #ok height: 30 ];
yourself).