• 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: Ordered to-many relationship CoreDataGeneratedAccessors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re : Re: Removing a file via NSFileWrapper
  • Next by Date: Re: Cocoa-dev Digest, Vol 11, Issue 170
  • Previous by thread: Re: Preparation for doing a bug report for CIPageCurlTransition
  • Next by thread: Re: Ordered to-many relationship CoreDataGeneratedAccessors
  • Index(es):
    • Date
    • Thread