Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Fuzej

macrumors newbie
Original poster
Jul 20, 2012
12
0
Code:
 NSManagedObjectContext *context = [app managedObjectContext];
        Objects *objects = (Objects*)[NSEntityDescription insertNewObjectForEntityForName:@"Objects" inManagedObjectContext:context];        
        objects.objectNaam = textfieldNaam.text;
        objects.objectBeschrijving = textfieldBeschrijving.text;

        NSError *error;
        
        if(![context save:&error])
        {
            NSLog(@"ERROR");
        }
        else{
            NSLog(@"Added");
        }

                // save the changes if needed and change views to noneditable
    }

Error:

2012-07-27 19:23:39.211 Choose3[6517:fb03] *** NSInvocation: warning: object 0x18f6500 of class 'Object' does not implement methodSignatureForSelector: -- trouble ahead
2012-07-27 19:23:39.212 Choose3[6517:fb03] *** NSInvocation: warning: object 0x18f6500 of class 'Object' does not implement doesNotRecognizeSelector: -- abort


I have a Core Data Generated Class, Objects.h (originally Object.h, changed it to Objects because maybe it had something to do with reserved words) and three other NSManagedObject Subclasses (Actor, Operation and Goal)

Tried in this line:
Code:
Objects *objects = (Objects*)[NSEntityDescription insertNewObjectForEntityForName:@"Objects" inManagedObjectContext:context];
to change "Objects" to the other 3 classes (changed Objects to Actor, Operation or Goal and didn't receive error..)
Someone an idea ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.