Re: creating new instance of coredata entity
Re: creating new instance of coredata entity
- Subject: Re: creating new instance of coredata entity
- From: Jamie Hardt <email@hidden>
- Date: Thu, 11 Sep 2008 11:09:09 -0700
Oh... Is this what you mean?
NSArray *objectsToLoopThru = [myArrayControllerWithRecordsFromTheWeb
arrangedObjects];
foreach (id oneObjectInTable in objectsToLoopThru) {
NSManagedObject *newObjectToStore = [NSEntityDescription
insertNewObjectForEntityForName:@"CustomerEntity"
inManagedObjectContext:myMOC];
[newObj setValue:[oneObjectInTable valueForKey:@"firstName"]
forKey:@"firstName"];
[newObj setValue:[oneObjectInTable valueForKey:@"lastName"]
forKey:@"lastName"];
// etc...
}
On Sep 11, 2008, at 10:58 AM, Amy Heavey wrote:
Thanks,
I have got access to the datamodel, I've imported it into my xcode
project, it's how to actually create and write the entity that i'm
stuck on, all the examples i've found seem to use bindings and add
buttons,
Many Thanks
Amy Heavey
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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