Re: change a value for a core data attribute programatically
Re: change a value for a core data attribute programatically
- Subject: Re: change a value for a core data attribute programatically
- From: mmalcolm crawford <email@hidden>
- Date: Tue, 21 Jun 2005 13:45:00 -0700
On Jun 21, 2005, at 1:30 PM, J. Atwood wrote:
How do I change a value for a core data attribute programatically?
By default, using key-value coding:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CoreData/Articles/cdUsingMOs.html#//apple_ref/doc/uid/TP40001803-212651>
Assume a very simple core data application (i.e. I have a
NSArrayController for all my entities and data is bound to tables
via the NSArrayControllers, like the simple Cocoa Dev Central
"BlogDemo" example.
My first thought was to do this in MyController:
[CustomerArrayController valueForKey:@"name"].
But that yields an error: [<NSArrayController 0x160ec10>
valueForUndefinedKey:]: this class is not key value coding-
compliant for the key name.
You're sending a message to the array controller, not the managed
object...
[[CustomerArrayController selection] valueForKey:@"name"]
mmalc
_______________________________________________
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