On Wed, Feb 11, 2009 at 2:48 PM, Luke Evans <l...@eversosoft.com> wrote:
> The parent MO is defined with an 'elements' property (nominally an NSSet). How? What does this declaration look like in your classes? I assume you have at least one custom subclass of NSManagedObject specified (for your "Element" entity), based on the code example you gave, but it's important to let us know *how* this is declared. > So for simply reading the set and converting it to an array, I had imagined > the following would be OK: > > NSArray *elements = [parent.elements allObjects]; > > Now, this turns out to be bad, as on occasion (and I think, when there are > no elements), I get the error: > *** -[NSCFArray allObjects]: unrecognized selector sent to instance > <whatever> I'd be just as surprised as you - I've never run into this problem personally and would've expected it to produce a set, not an array. Then again, I'm still begrudgingly sticking to Obj-C v1 on all but my newest project, so it may have something (or a lot, or everything) to do with Obj-C 2's dot syntax or synthesized properties, and not Core Data. -- I.S. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com