objective c - How to dynamically update an NSTreeController and NSOutlineView? -


when outlineviewitem expanded -

 (void) outlineviewitemdidexpand:(nsnotification *)notification 

-, i'm able add object treecontroller (log statements show newly added object in correct place of hierarchy), outlineview/ui isn't updating reflect insertion.

to no avail, i've used

  • [self.outlineview reloaditem:nil reloadchildren:yes],

  • [self.outlineview reloaddata], ,

  • [self.outlineview sethidden:yes] then
    [self.outlineview sethidden:no]

to try force reload structure.

this done programmatically in objective-c.

6 hours later, got it.

i needed update nstreecontroller cache, achieved via rearrangeobjects method.

so answer question is:

[self.clouddirectorytreecontroller rearrangeobjects]; 

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -