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;