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.

Foi útil?

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
scroll top