Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error with proxy objects and to-many relationships with Core Data




On Feb 26, 2006, at 7:35 PM, Sean Willson wrote:

Does anyone have any ideas on how to diagnose this problem?

This has nothing to do with Core Data.

As the documentation states:

"selection
Returns a proxy object representing the receiver’s selection."


<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSObjectController.html#// apple_ref/occ/instm/NSObjectController/selection>


The method returns a *proxy*, not the actual object. So you can't use it as an "ordinary" object. If you need the actual object, use:

	[[fooBarController selectedObjects] objectAtIndex:0];


In general there aren't that many good large scale core data references out on the web right now and it's quite painful. I am working on a detail application that is quite dependent on Core Data and find the documentation to be quite sparse.

If you find deficits in the documentation, please file enhancement requests. Please also bear in mind that, as in this case, many "issues" with Core Data are not specific to Core Data...

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Error with proxy objects and to-many relationships with Core Data (From: "Sean Willson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.