NSTreeController get added child
-
14-10-2019 - |
Pergunta
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.
Solução
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?
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow