I get this classic error:
used to open the store Model
NSManagedObjectContext * context = [[AppDelegate *] [[UIApplication ShareApp]
Rep] Managed Object Contex]; NSManagedObject * newShot = [NSEntityDescription insertNewObjectForEntityForName: Managed object contexts in "shotName": context]; NSString * newName = @ "test"; [New shot setname: new name];
And how it's made:
Not only do I have an accident with the above message, I am also getting this warning:
'NSManagedObject' can not be answered by'setName: ':'
Obviously something is wrong I think I am using string on both sides.
Edit, I am now using it after Imant's comment:
NSManagedObjectContext * context = [[AppDelegate *] [[UIApplication shared applicant ] Rep] Managed Object Contex]; NSManagedObject * newShot = [NSEntityDescription insertNewObjectForEntityForName: Managed object contexts in "shotName": context]; NSString * newName = @ "test"; [New shot set value: newname for: @ "shot number"]; [Reference prevention];
But I'm still getting:
'NSManagedObjectContext' can not answer '-saveAction'
Use setValue: forKey:
UPDATE
NSManagedObjectContext
has the Saving
method, not the save code
. Therefore:
NSError * error = zero; [Save the reference: & amp; Error] if (error) {[NSAPP present error: error]; Return; }
Comments
Post a Comment