Many of you who use Core Data know that you can change properties of managed objects with KVC syntax:
FUNCTIONING: [newTest setValue:[NSString stringWithUUID] forKey"uuid"];
I would like to use the Obj-C 2 accessors to modify properties of the form:
aManagedObjectAttribute = aValue;
BROKEN: newTest.uuid = [NSString stringWithUUID];
If I use this syntax, it throws a compiler error of the genre: Property 'uuid' not found on object of type 'NSManagedObeject *'
According to the documentation, I am supposed to add accessors in either a Category or as a MO subclass.
I have downloaded a few examples, and cannot figure out where I should put these accessors. By including the category as a header, I can avoid the compiler error, but then I get a:
-[NSManagedObject setUuid:]: unrecognized selector sent to instance 0x1002428f0
How should I implement the obj-C 2 standard in a practical sense? (i.e. where should I put the files? When/where do I include the headers; How do you use the categories for the modeled object graph?)
FUNCTIONING: [newTest setValue:[NSString stringWithUUID] forKey"uuid"];
I would like to use the Obj-C 2 accessors to modify properties of the form:
aManagedObjectAttribute = aValue;
BROKEN: newTest.uuid = [NSString stringWithUUID];
If I use this syntax, it throws a compiler error of the genre: Property 'uuid' not found on object of type 'NSManagedObeject *'
According to the documentation, I am supposed to add accessors in either a Category or as a MO subclass.
I have downloaded a few examples, and cannot figure out where I should put these accessors. By including the category as a header, I can avoid the compiler error, but then I get a:
-[NSManagedObject setUuid:]: unrecognized selector sent to instance 0x1002428f0
How should I implement the obj-C 2 standard in a practical sense? (i.e. where should I put the files? When/where do I include the headers; How do you use the categories for the modeled object graph?)