Hi guys,

every time I find myself doing something convoluted I think hey I must be doing 
this wrong:-)

I have a Report WindowController, that opens a Window from it's own nib. This 
is great, I can open lots of different Reports all bases on the same 
Controller. But I only need the Window and the controller to stay around while 
the Window is open. It's all self contained and nothing else needs reference it.

Is it ok to [self retain] in the Controller's init, then [self release] in the 
- (void)windowWillClose:(NSNotification *)notification. Is that the best place 
to do this, I'm not at all sure about an object retaining and releasing itself.

at the moment I'm storing all these reports in an array to stop the controller 
disappearing out from underneath me and then removing them when the Window 
closes, I'm sure there's a better way.

Cheers
Kevin_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to