NSTreeController rearrangeObjects doesn't always trigger sorting
NSTreeController rearrangeObjects doesn't always trigger sorting
- Subject: NSTreeController rearrangeObjects doesn't always trigger sorting
- From: Jonathan Fewtrell <email@hidden>
- Date: Tue, 29 Jul 2008 10:41:01 +1200
I know that similar issues have been raised in the past, but I haven't
been able to find a clear solution.
I have a Core Data app with an NSOutlineView controlled by an entity-
mode NSTreeController bound to the managed object context. The
NSTreeController has sort descriptors based on certain attributes of
the model object.
Sorting does take place when the frameworks seem to think fit (for
example when a document is opened), but if I call -rearrangeObjects to
force a sort programmatically nothing happens. Actually, if I tick
'Uses Lazy Fetching' in the controller's IB attributes, the view will
sort the first level of nodes, but not the deeper levels.
Sorting was working fine in earlier versions of the OS. I'm now in
10.5.4 and I'm not certain which version introduced this problem.
Any suggestions? I am conscious of the slightly strange wording of the
documentation of this method, which is much less clear cut than that
of the NSArrayController equivalent. It almost suggests that the
method will only work in subclasses. If so, I don't understand why.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden