Re: Array controller?
Re: Array controller?
- Subject: Re: Array controller?
- From: Allan Odgaard <email@hidden>
- Date: Sun, 18 Apr 2004 12:50:21 +0200
On 18. Apr 2004, at 8:45, Scott Anguish wrote:
(For Ondra) typically, you'd be binding to the File's Owner which
would contain the model data.. and that's targetable as a binding
controler(
What are the rules governing object lifetimes and bindings? I notice
that addObserver:... states that neither receiver or observed object is
retained, but if I bind to File's Owner (subclass of
NSWindowController), then sending (auto)release to self in
windowWillClose: will *not* dispose of the window controller (and thus
the entire nib) -- which of cause works when there are no bindings to
File's Owner.
It would seem to be a retain cycle (i.e. the nib retains the nib owner,
because of bindings) -- if instead my application is document based and
thus the File's Owner is an NSDocument (to which I bind), the problem
does not exist. But if adding a manual binding to self in e.g.
windowControllerDidLoadNib:, then the same problem exist, i.e. the
document will then not be released, when the window is closed, unless I
unbind in windowWillClose:.
** Cocoa FAQ: <
http://www.alastairs-place.net/cocoa/faq.txt> **
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.