• 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
NSArray instance variable and core data objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArray instance variable and core data objects


  • Subject: NSArray instance variable and core data objects
  • From: Tim McDonald <email@hidden>
  • Date: Sun, 4 Mar 2007 14:20:23 +0000

Hi

I'm having trouble defining a NSArray instance variable within a core data app. A particular object has a number of methods which access managed objects, retrieve values, then feed these values to a neural network. The order in which the values are retrieved is important therefore I was attempting to create a NSArray instance variable to store an ordered list of managed objects.


from header file: NSArray *inputCharacteristicTypes;

from source file:
inputCharacteristicTypes = [NSArray arrayWithArray:[[self mutableSetValueForKey:@"inputCharacteristicTypes"] allObjects]];



Unfortunately, when the application is run I get the following error at the end of the method that contains the above code.


*** NSRunLoop ignoring exception 'Cannot create NSSet from object (
<NSManagedObject: 0x139fa30> (entity: CharacteristicType; id: 0x139fa60 <x-coredata:///CharacteristicType/t66420BDA-6E0C-402F-B756- C701F781D733> ; data: {...}) ) of class NSCFArray - consider using contentArray binding instead of contentSet binding' that raised during posting of delayed perform with target 486d170 and selector 'invokeWithTarget:'


What really confuses me is the fact the above code works foe NSSet and individual objects. eg.

from header file:
NSSet *inputCharacteristicTypesSet;
id *anInputCharacteristicType;

from source file:
inputCharacteristicTypesSet = [self mutableSetValueForKey:@"inputCharacteristicTypes"];
anInputCharacteristicType = [inputCharacteristicTypes objectAtIndex:0];


Any idea where I'm going wrong?

Cheers

Tim

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: NSArray instance variable and core data objects
      • From: mmalc crawford <email@hidden>
    • Re: NSArray instance variable and core data objects
      • From: Timothy Larkin <email@hidden>
  • Prev by Date: Re: rotating an object around the center of a view
  • Next by Date: Re: Removing formatting goo from NSRulerView subclass...
  • Previous by thread: Re: rotating an object around the center of a view
  • Next by thread: Re: NSArray instance variable and core data objects
  • Index(es):
    • Date
    • Thread