2

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.

sharvey
  • 7,635
  • 7
  • 48
  • 66

1 Answers1

2

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?

Mike Abdullah
  • 14,933
  • 2
  • 50
  • 75