• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Array controller?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Array controller? (From: Ondra Cada <email@hidden>)
 >Re: Array controller? (From: mmalcolm crawford <email@hidden>)
 >Re: Array controller? (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: CodeWarrior vs. Xcode?
  • Next by Date: Re: NSObjectController and NSDefaultsController Binding?
  • Previous by thread: Re: Array controller?
  • Next by thread: Re: Array controller?
  • Index(es):
    • Date
    • Thread