Detecting "window closed" for modal Spec window

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Detecting "window closed" for modal Spec window

Peter Uhnak
Hi,

is it possible to detect when a modal window was closed in Spec?

I can do the following

window := TextModel new openWithSpec.
window window announcer when: WindowClosed do: [ self inform: 'window closed' ].

But when I make the window modal it is no longer being announced

window := TextModel new openWithSpec.
window modalRelativeTo: self currentWorld.
window window announcer when: WindowClosed do: [ self inform: 'window closed' ].

Is there some other way how I can achieve this?


Thanks,
Peter