Hello, here is the block where arrayController is nil :
{
NSData * data;
NSError * error;
Class klass;
if(_arrayController != nil) // nil !
{
selected = [_arrayController selectedObjects];
arranged = [_arrayController arrangedObjects];
if([selected count] > 0)
{
_currentObject = [selected objectAtIndex:0];
if(_currentObject != nil)
{
data = [_currentObject valueForKey:kVrRoot];
klass = [NSMutableDictionary class];
_vrRoot =
[NSKeyedUnarchiver unarchivedObjectOfClass:klass fromData:data error:&error];
}else
{
_vrRoot = [NSMutableDictionary new];
data = [NSKeyedArchiver archivedDataWithRootObject:_vrRoot requiringSecureCoding:YES error:&error];
}
}
}
}
I use this for years so I don't no what's wrong.
Are you certain that the arrayController
property on the AppDelegate reads/writes from/to the _arrayController
instance variable? Does your AppDelegate contain a custom implementation of -setArrayController:
? Does it still fail if you explicitly synthesize the property: @synthesize arrayController = _arrayController;
?
Is the arrayController
property declared strong
or weak
?