Cannot perform operation because childrenKeyPath is nil
Why do I get this crash error when I try to insert a child into my
NSTreeController?
NSTreeController *tree = [NSTreeController new];
NSTreeNode *node1 = [NSTreeNode treeNodeWithRepresentedObject:@{ @"type":
@"shirt" }];
// The below method causes mysterious crash
[tree insertObject:node1 atArrangedObjectIndexPath:[NSIndexPath
indexPathWithIndex:0]];
and Xcode says:
*** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: '<NSTreeController:
0x1005c4620>[object class: NSMutableDictionary] Cannot perform operation
because childrenKeyPath is nil'
***
Why is causing this error? What is childrenKeyPath and why do I need it
(I'm not using interface builder)?
ReplyDeleteGreat Article
B.Tech Final Year Projects for CSE in JavaScript
FInal Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai