Hi ben
I would like to unsubscribe announcement when the window is closed. Is there a hook for that in Spec? Stef |
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 <[hidden email]> wrote: Hi ben |
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 <[hidden email]> wrote:
"Every thing has its own flow"
|
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 <[hidden email]> wrote:
|
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 <[hidden email]> wrote:
|
In reply to this post by Benjamin Van Ryseghem (Pharo)
I notice that more frequently in your replies. To not judge people. We do not need it. We are all good programmers. I need to know if there is a hook not that you explain me that my design is bad, because it is not ;) I think that I know what are layer, MVP, MVC and little friends are. This is not my model behavior. I want my ui not to get notification from my model anymore. So to me this is the responsibility of the UI to unregister itself and I do not see who else could do it. I have again the same problem that my Spec UI instance is not garbage collected and I only use weak announcements and I need to understand why. Stef
|
In reply to this post by Andrei Chis
thanks
Stef
|
In reply to this post by Stéphane Ducasse
SOrry, it was not my intention :(
Ben On Jul 17, 2013, at 8:07 PM, Stéphane Ducasse <[hidden email]> wrote:
|
On Jul 17, 2013, at 8:15 PM, Benjamin <[hidden email]> wrote:
I loaded my code in the fresh and latest 30 and invoking the GC this time removed the UI instance. So I prefer that. Now my logging frameworks can get a streamLogger that displays information by default in the transcript and in the UILogger. I'm getting where I wanted. Stef
|
Free forum by Nabble | Edit this page |