Re: set values in coredata
Re: set values in coredata
- Subject: Re: set values in coredata
- From: mmalc crawford <email@hidden>
- Date: Sat, 10 Feb 2007 20:00:41 -0800
On Feb 10, 2007, at 7:44 PM, Brian Todd wrote:
When I change a value in a text field I would like all the values
in a core data entity to change based on the modified value. I have
been trying to figure out if there is a way to do this with bindings
but I haven't figured it out yet.
The Core Data documentation strongly recommends *not* trying to learn
bindings and Core Data at the same time:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdBeforeYouStart.html
>
The reason that I have the calculated values in their own entity
instead of created when I need them is that the user can choose to
modify them individually and disable the calculation.
It is not clear what this means.
It would be helpful if you used appropriate terminology -- for
example, you should differentiate between entities and managed objects.
If as I suspect, there is no elegant way to use bindings for
this. What is the most straightforward way to modify entity values
in coredata?
Assuming you mean, how do you change property values in an instance of
a managed object, this is covered here:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOs.html#//apple_ref/doc/uid/TP40001803-212651
>
It seems like it should be just a couple lines of code but I can't
tell from Apple's docs if I need to create a fetch request and
subclass NSManagedObjectContext just to edit a value.
Nowhere does the documentation suggest subsclassing
NSManagedObjectContext.
You use a fetch request to retrieve managed objects, as described here:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdFetching.html
>
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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