Re: newbie : cocoa bindings - dot separated key path question
Re: newbie : cocoa bindings - dot separated key path question
- Subject: Re: newbie : cocoa bindings - dot separated key path question
- From: joe OneNinetyTwo <email@hidden>
- Date: Wed, 16 Aug 2006 17:34:24 -0700 (PDT)
--- Matt Neuburg <email@hidden> wrote:
> You do not want to bind your model objects to the
> controllers; you want to
> bind the controllers to MyDocument (because that is
> where the DataSet model
> object is) or to an instance of DataSet that is
> instantiated in the nib. If
> the former, the key paths must include the path to
> the DataSet model object
> (at the start). Everything you do must be KVC / KVO
> compliant so that the
> controllers can see the changes.
I was able to get the latter approach (binding the
controller to a DataSet model instance) to work, but
that generated my follow up bug (NSDocument open/new
file problem when model object instance is in nib.).
If I tried the former, that is, switch the controller
content to MyDocument, then I got key path errors. I
didn't understand why my key paths would need to
change with this switch.
However, I WAS able to get everything working, by
deleting the DataSet model instance from the nib, and
setting the controller content in my code inside
windowControllerDidLoadNib
[dataSetController setContent:dataSet];
using a IBOutlet to get the dataSetController.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden