NSOutlineView initial expansion

2008-12-03 Thread Andrew Shamel
I've trolled through the archives looking for help on this, but I can't seem to find anything that quite works. I'm trying to set it up such that an NSOutlineView starts out fully expanded. In the delegate, I have the following code: - (void)awakeFromNib { [outline expandItem:nil

Re: NSOutlineView initial expansion

2008-12-03 Thread Ashley Clark
If your outline's data is being populated from an NSTreeController then the fetch isn't happening until the next iteration of the event loop. If I understand it correctly this is done so that it can present any errors as a sheet on your window. Try delaying your call to expandItem: in your

Re: NSOutlineView initial expansion

2008-12-03 Thread Andrew Shamel
Ahh, brilliant!! It worked a treat. Thanks so much! Try delaying your call to expandItem: in your awakeFromNib. - (void)expandAllItems { [outline expandItem:nil expandChildren:YES]; } - (void)awakeFromNib { /* snip */ [self performSelector:@selector(expandAllItems) withOb