• 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
-[NSCFString _isMaintainingInverse]: selector not recognized [self = 0x305c]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-[NSCFString _isMaintainingInverse]: selector not recognized [self = 0x305c]


  • Subject: -[NSCFString _isMaintainingInverse]: selector not recognized [self = 0x305c]
  • From: shaun bear <email@hidden>
  • Date: Fri, 3 Nov 2006 12:33:27 +0100

I am new to Cocoa programming and CoreData. Can anybody tell me how to add a detail object to a
master-detail relationship without getting the following error:


-[NSCFString _isMaintainingInverse]: selector not recognized [self = 0x305c]


I have 2 custom classes that sub-class NSManagedObject: Master and Detail. I have auto-generated
these classes with accessor using XCode.


There is a -to many relationship from Master to Detail with inverse.

I am using the auto-generated method in "Master" to add the Detail object:

- (void)addDetailObject:(Detail *)value

{
// [[DetailController selectedObjects] objectAtIndex:0];
NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];


[self willChangeValueForKey:@"detail" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];

   [[self primitiveValueForKey: @"detail"] addObject: value];

[self didChangeValueForKey:@"detail" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];

    [changedObjects release];
}

I have googled for this but cannot find an example or a solution for how to do this. I did find the cause of the
problem:


"The program is attempting to make the NSArrayController's own proxy object
the contents of the to-many relationship. Data added to the object graph
cannot be proxies for the data to be added but has to be the modeled data
itself. Another way to look at the problem is if the proxies could replace
the data they are supposed to be proxying, they would would no longer be
proxies of data but would have become the data itself."


Any help would be very much appreiciated.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: -[NSCFString _isMaintainingInverse]: selector not recognized [self = 0x305c]
      • From: Adam Knight <email@hidden>
  • Prev by Date: Re: Copyright Violations using Apple Icons in own Applications?
  • Next by Date: Odd textView behavior
  • Previous by thread: Re: Retrieving barcode with a bluetooth barcode scanner ?
  • Next by thread: Re: -[NSCFString _isMaintainingInverse]: selector not recognized [self = 0x305c]
  • Index(es):
    • Date
    • Thread