Re: Modifying Core Data fields Programatically
Re: Modifying Core Data fields Programatically
- Subject: Re: Modifying Core Data fields Programatically
- From: "Bobby B" <email@hidden>
- Date: Wed, 5 Apr 2006 07:57:01 -0400
Hi Mathieu;
I had a similar problem when I started, only a couple of weeks ago.
The problem, as I was told, has nothing to do with CoreData. It's in
the array controller (since it is controlling your data.)
Here's what you need to do. Create an IBOutlet for the
arraycontroller. Then you modify the arraycontroller through the
outlet, and that will make changes into the fields on the screen for
whatever coredata/bindings is keeping track of.
In interface: IBOutlet NSArrayController * myArrayController;
Then in your code:
[myArrayController setValue:@"hello!" forKeyPath:@"selection.name"];
and/or (to get the value)
NSString *myName = [myArrayController valueForKeyPath:@"selection.name"];
Notice that you use forKeyPath! Not forKey!
Hope this helps,
Bobby
_______________________________________________
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