You can add this to the initialize method of your widget, and in the close
method unregister all announcers

  self whenWindowChanged: [:w | w whenClosedDo: [ self close ] ].


Andrei

On Wed, Jul 17, 2013 at 3:42 PM, Benjamin <
[email protected]> wrote:

> Ok :)
>
> Then there is a hook in Morph for that I think :)
> (and an announcement in Spec when a widget is built)
>
> Ben
>
> On Jul 17, 2013, at 3:37 PM, Tudor Girba <[email protected]> wrote:
>
> I guess what Stef means is that he would like to know if there is a way
> specify custom behavior when a window closes, and then use this for his
> purpose of unregistering from some announcer.
>
> Cheers,
> Doru
>
>
> On Wed, Jul 17, 2013 at 2:36 PM, Benjamin <
> [email protected]> wrote:
>
>> I do not think it's a UI framework concern to handle model behaviour
>> (like registration to announcement)
>>
>> Ben
>>
>> On Jul 17, 2013, at 9:40 AM, Stéphane Ducasse <[email protected]>
>> wrote:
>>
>> Hi ben
>>
>> I would like to unsubscribe announcement when the window is closed.
>> Is there a hook for that in Spec?
>>
>> Stef
>>
>>
>>
>>
>>
>>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>
>

Reply via email to