re: Problem adding an entity to a to-many relationship
re: Problem adding an entity to a to-many relationship
- Subject: re: Problem adding an entity to a to-many relationship
- From: Ben Trumbull <email@hidden>
- Date: Mon, 5 Jan 2009 22:15:52 -0800
Keith,
I am trying to get my head round Core Data and Bindings.
This can be a lot easier to do for the technologies separately. You
can create a Foundation tool project, add the Core Data framework, and
work out your Core Data learning in a simple command line tool. The
"Low Level Core Data Tutorial" is, ironically, an good demystifying
introduction.
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreDataUtilityTutorial/Articles/chapter_1_section_1.html
>
The problem comes when I try to add the student to its owning course.
I get the course from the array controller using:
Course *course = [[coursesController selectedObjects] objectAtIndex:
0];
This seems to return the correct entity.
Then I then add the student using the predefined accessor:
[course addStudentsObject:student];
This fails in the call [NSBinder
_invokeSelector:withAguments:onKeyPath:ofObject:mode:raisesForNotApplicableKeys
:]
You might try the Cocoa Bindings Reference Guide's chapter on Working
with a Controller's Selection. Also, a full backtrace from gdb at the
point of failure would be useful. You can get one using a breakpoint
on objc_exception_throw
- Ben
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden