Begin forwarded message:
Date: June 20, 2005 5:38:42 PM CDT
Subject: Re: core data/table column sorting question
On Jun 20, 2005, at 4:51 PM, John Timmer wrote:
When the program starts, I want the table view to be sorted by one of
its columns so that the column is highlighted and has the little
triangle in it. Also, if the user decides to sort another column, is
there a way I can track that so that next time the document is
loaded, I can set that column to be sorted with the highlight and
triangle.
You can bind the sort descriptors to an object as NSData that's unarchived
via a transformer. If you've got a document based app that includes
document-wide preferences, put a variable in that to hold the descriptor -
otherwise, put it in your app's preferences. Works great.
JT
Does binding the sort descriptor highlite the column and display the triangle? The reason I ask is that if I programatically set the sort descripter, it will sort but it does not highlite the column header (and I think it does not allow the user to change the direction of sorting by clinking on the column header.
Thanks a lot
Alan
_______________________________________________
This mind intentionally left blank