Re: Core Data doesn't save toMany relations please HELP :S
Re: Core Data doesn't save toMany relations please HELP :S
- Subject: Re: Core Data doesn't save toMany relations please HELP :S
- From: Joanna Carter <email@hidden>
- Date: Thu, 25 Mar 2010 22:39:54 +0000
Hi Quincey
> Or, I'd prefer to give my File's Owner object a "currentObject" property and bind the object controller to that.
I can understand that. It's beginning to look like you're more anal about OO design than I am ;-)
> Or, if circumstances preclude either of these approaches, I'd probably invoke the "last resort" clause and ask the object controller for its content.
Ah, anal, up to a point :-)
> * It doesn't really change the answer, but that's not how I use object controllers anyway. Instead of switching the content object, I just bind the object controller to the data model (or to, say, a window controller that provide a suitable set of properties based on the data model), and use a "model key" when binding a UI element to the object controller.
Gotcha.
As it is, I really like my new discovery of "copying" the object to a NSMutableDictionary. It avoids having to create a secondary MOC and manage the messing around with finding and copying objectIDs for relationships, as well as allowing Undo to work nicely.
But, this dictionary method does mean populating the dictionary before editing and then shoving it into the object controller, then doing the reverse after editing.
Unless, I bind the controls directly to the dictionary?
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
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