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

Josh Kahane

macrumors 6502
Original poster
Aug 29, 2006
439
1
Suffolk, UK
Hi

I am new to CoreData and I am having issues getting it working. As you can see I have a couple of errors:

http://b.imagehost.org/0891/Screen_shot_2010-11-20_at_14_36_10.png

Basically Im trying to do the following:
1. User selected UITextView (notesView) and types in their note.
2. Upon leaving the UITextView save the note and the date it was made on.
3. When the user changes the date in the UIDatePicker (datePicker) load any note if there is one related to that date.

So similar to notes in a calendar, notes saved to a specific date.

Hope you can help, thanks.
 
The first and second error messages are caused by assigning the result of NSDate method timeIntervalSinceNow to a pointer -- check the documentation to see what is expected. The easiest way to check the docs, in XCode, is to right click on 'timeIntervalSinceNow' and select "Find in Documentation".

The third and fourth error messages are self-explanatory -- but unusual, and without more information we would just be stabbing in the dark.

Regarding the first warning, then, as written, that line of code requires the following method in your class:

Code:
+ (NSManagedObjectContext*)managedObjectContext {
    // ...
    return ...;
}

The plus sign in the method signature is Objective-C syntax for a class method. Judging by your use of self.managedObjectContext elsewhere then this is probably not what you want.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.