NSTreeController get added child
-
14-10-2019 - |
Question
When NSTreeController -(void)addChild:(id)sender
is called, is there a way to get the NSManagedEntity
that was created?
The documentation mentions that the result of this method is deferred to the next loop run.
Solution
No there isn't, because the object won't be created until after that method has returned. Internally, NSTreeController
should call this method:
- (void)insertObject:(id)object atArrangedObjectIndexPath:(NSIndexPath *)indexPath
Can you override that to your advantage instead?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow