Re: Ordered to-many relationship CoreDataGeneratedAccessors
Re: Ordered to-many relationship CoreDataGeneratedAccessors
- Subject: Re: Ordered to-many relationship CoreDataGeneratedAccessors
- From: Fritz Anderson <email@hidden>
- Date: Mon, 31 Mar 2014 09:32:50 -0500
On 29 Mar 2014, at 3:11 AM, Rick Mann <email@hidden> wrote:
> I'm getting
>
> -[WireSegment replaceObjectInNodesAtIndex:withObject:]: unrecognized selector sent to instance
>
> When I try to send that message. This is one of the "CoreDataGeneratedAccessors", for an ordered to-many relationship. I don't see anything in the docs about those. What am I missing?
>
> --
> Rick
I assume "WireSegment" is an object variable despite the name.
I believe that what KVC is giving you for .nodes is an NSSet. What you want to do is
[[wireSegment mutableOrderedSetValueForKey: @"nodes"]
replaceObjectAtIndex: anIndex withObject: newObject];
… which you’d likely want to wrap in a method of your own.
I think. Written in Mail, uncompiled, untested.
— F
_______________________________________________
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