Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How do you use Key Value Coding on an NSManagedObject?

How do you use Key Value Coding on an NSManagedObject?
Thread Tools
Forum Regular
Join Date: Aug 2005
Status: Offline
Reply With Quote
Apr 5, 2006, 06:34 PM
 
I have an entity called "Source" and I would like to use KVC to change the value for the attribute called "title" within the "Source" entity. I have the "Source" NSManagedObject bound to an NSArrayController that has an IBOutlet connected to it called "sourceArrayController".

I have tried
[sourceArrayController setValue:@"newTitle" forKey:"title"];
but I get an error "this class is not key value coding-compliant for the key title.

I have been also trying to retrieve the NSManagedObject "Source" programatically, but I can't find any methods to do so. Do I have to use KVC on an NSManagedObject directly? I am guessing that is why I couldn't do it via the NSArrayController, but I am not sure.

Thanks everyone for helping me with my many many questions!
-Kenny
YummySoup! - Recipe management and sharing at its best!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:36 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2