• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
re: Problem adding an entity to a to-many relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Problem adding an entity to a to-many relationship
      • From: Keith Lander <email@hidden>
  • Prev by Date: Programmatically locking user screen
  • Next by Date: Re: Visualization strategy/choosing a framework
  • Previous by thread: Re: Problem adding an entity to a to-many relationship
  • Next by thread: Re: Problem adding an entity to a to-many relationship
  • Index(es):
    • Date
    • Thread