views:

11

answers:

1

Hi

I have this application which is saving tweet messages from twitters public time line.

For that I have created a "Tweet" entity in my model & has generated a managed object class from XCode. I have declared Tweet ivar in my controller class & have synthesized it but when I try to put some value in it like

tweet.text = @"Some parsed json tweet text";

And then NSLog the value of tweet.text it prints (null).

What am I missing are there any extra considerations I need to take care of ...? I am very new to CoreData your help will be highly appreciated.

Thanks in advance.

Edit :

    NSManagedObjectContext *context = [self managedObjectContext];
 NSManagedObject *managedTweetObject = [NSEntityDescription insertNewObjectForEntityForName:@"Tweet" inManagedObjectContext:context];
 [managedTweetObject setValue:[NSDate date] forKey:@"timeStamp"];

this code works like a charm.

A: 

Your description suggest that the Tweet class is either not properly setup or is not properly added to the build. An incorrect accessor could also cause the problem.

It is hard to tell without code. You should post the Tweet class source.

TechZen
I got it working thanks.
Asad Khan