Search code examples
cocoaosx-lionnsoutlineview

Source list groups hidden by default


In Lion, source list group items now have a Hide/Show button that appears when the mouse rolls over the item. My problem is that all my groups are initially hidden, and I have to click "Show" to see their contents. How do I make them shown by default?

(I'm using a view-based outline view, if that matters)

Relevant code is at https://github.com/Uncommon/Hugbit/commit/9356cf619befdfd5e81d7e0a54f528abf624c0b7


Solution

  • I ended up finding the solution myself.

    The problem is that I'm loading some of the sidebar content asynchronously. When the outline view sees groups that are initially empty, it also makes them initially collapsed.

    The key is to wait until all my sidebar items are loaded, and then expand the groups.