Re: Where's the best place for addObserver and removeObserver

2008-07-17 Thread Joan Lluch (casa)
El 17/07/2008, a las 18:13, Jonathan Dann escribió: Hi Joan, As Keary says, removing in -dealloc is probably not the best thing to do as there are a few cases that this can bite you, like if your window controller retains the view controllers, and -dealloc is called on the window control

Re: Where's the best place for addObserver and removeObserver

2008-07-17 Thread Jonathan Dann
Hi Joan, As Keary says, removing in -dealloc is probably not the best thing to do as there are a few cases that this can bite you, like if your window controller retains the view controllers, and -dealloc is called on the window controller, which would proceed to release its collection of

Re: Where's the best place for addObserver and removeObserver

2008-07-17 Thread Keary Suska
7/17/08 8:59 AM, also sprach [EMAIL PROTECTED]: > However, the way I am doing it makes me wonder where the best place > should be for adding and removing the observers. What I am currently > doing is adding the observers in the awakeFromNib methods of each > viewController, and removing them in th

Where's the best place for addObserver and removeObserver

2008-07-17 Thread Joan Lluch (casa)
I am coding a single window, multiview, app, and as what I think is a recommended design pattern I only load the views controllers (and therefore their views) from their nibs as they are required, and then I retain them in the main window controller so they do not have to be loaded again ea