Re: How do I get indirect binding to work?
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