• 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: How do I get indirect binding to work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get indirect binding to work?


  • Subject: Re: How do I get indirect binding to work?
  • From: Keary Suska <email@hidden>
  • Date: Fri, 05 Oct 2007 12:35:02 -0600
  • Thread-topic: How do I get indirect binding to work?

on 10/5/07 11:28 AM, email@hidden purportedly said:

> 1. NSObjectController content should point at MyDocument

Or you could use the content binding. Depends on what the content really
is--is it the document object, or the book object?

> 2. MyDocument should have an outlet (which I called book), pointing at my Book
> object.

Generally, you wouldn't want to instantiate your model object in your nib.
It would be best if the document object "owns" the book object.

> 3. NSTextField Inspector Model Key Path: should be changed from title to
> book.title

Yes, considering that your document object is the controller's content and
"book" is the property for the book object in the document object.

> Is this correct? I tried this but my app keeps crashing on quit from app.

It should work, although it may not be entirely "correct" by various
reckoning. Why your app is crashing, is anyone's guess, since you haven't
indicated the "why" of the crash--i.e. the error being reported, rather than
what is in your code that is causing it, such as "EXEC BAD ACCESS".

Are you, by chance, explicitly releasing the "book" object in the document
object somewhere, without having explicitly retained it beforehand?

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >How do I get indirect binding to work? (From: Bob Ueland <email@hidden>)

  • Prev by Date: Re: ObjC vs C++ (was: Is ZLib available in Cocoa?)
  • Next by Date: Re: How do I get indirect binding to work?
  • Previous by thread: How do I get indirect binding to work?
  • Next by thread: Re: How do I get indirect binding to work?
  • Index(es):
    • Date
    • Thread