best way to sort an NSOutlineView?
best way to sort an NSOutlineView?
- Subject: best way to sort an NSOutlineView?
- From: Daniel Morrow <email@hidden>
- Date: Fri, 15 Oct 2004 15:33:33 -0400
I have an NSOutlineView, one of the columns is expandable (obviously).
Anyway, when I click on the header of the column, I'd like it to sort,
but I'd also like the any expanded items to sort, too.
Right now, I have a delegate - outlineView:sortDescriptorsDidChange,
that gets called whenever the sort order changes. I'm sorting my
mutable array of data, and then calling "reloadData" - but this
particular block of data only belongs to the top level of data, not
expanded items.
So, then I figure I could write a recursive routine which would
traverse my arrays, and sort each one of them. But this seemed like too
much coding, and the whole reason I got into Cocoa was to get more
done, with less code. (I'm new to cocoa btw).
So, is there a sample somewhere which shows how to do sorting on an
NSOutlineView that doesn't require a lot of code?
Thanks for any help in this matter,
-Dan.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden