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
Post a Comment