On Jan 11, 2011, at 7:35 AM, Jerry Krinock wrote: > On 2011 Jan 10, at 21:39, Graham Cox wrote: > >> As suggested, to undo a sort, pass the old descriptors to the undo manager >> and when undo is invoked, it restores the old descriptors and once again >> invalidates the cache. > > But that assumes that the data was sorted with some old descriptors to begin > with. It seems like this would not work if the objects had been manually > arranged into some arbitrary order by the user.
Guys, why is sorting like this even an undo-able action in your apps ... ? That's pointless. Look at iTunes to see how you'd really do it: You'd have one column for the user-defined sort order (which conceptually contains an index by which you can sort that the user can change by dragging). So, to undo a sort, the user simply clicks another header. The way Jerry seems to have it right now, if I simply click a list header, my carefully hand-crafted item order is irrevocably destroyed. I can at best undo it. Sort order/list headers are a view-specific attribute. They shouldn't affect the model. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com