Re: Saving extra data using Core Data
Re: Saving extra data using Core Data
- Subject: Re: Saving extra data using Core Data
- From: Chris Hanson <email@hidden>
- Date: Sun, 12 Feb 2006 12:12:45 -0800
On Feb 12, 2006, at 11:58 AM, Andrew Merenbach wrote:
I have a program that makes use of Core Data. I would like to save
the state the contents of a text field and a couple of other
controls. What's the best way to go about this, since I can't
encode (can I?) manually? (I tried using an NSObjectController
with a special 'Settings' entity as its contents, and it shows up
on reload when fetched, but its data comes up as fault.)
My question in response is: What does this information represent,
and why isn't that also part of the data model used for your
documents or application?
Just represent the additional information you want to save as an
entity in your data model, create an instance of it in your document,
and use that instance to store the information. You can locate it
via a fetch request, and create and insert it if it's not present
already.
-- Chris
_______________________________________________
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