On Aug 14, 2008, at 9:28 PM, Graham Cox wrote:

I have a table view with a column + column header with a sort descriptor. In use, it works fine, I can click the column header and it sorts the list as it should, and the little arrow points up or down and it's blue.

When I first show the window though, it's white and no arrow is visible. Clicking it turns it blue. What do I need to do to make it come up properly first time? The table is the initialFirstResponder and that works correctly.


Howdy! call setSortDescriptors: on the tableview -- pass it the [tableColumn sortDescriptorPrototype] in an array.



Slightly weird - I have another list in the same window and its column headers come up fine. I can't see what I'm doing differently in the two cases, though that list has 3 columns and the one that doesn't work only has 1. For both lists I use the list's sortDescriptors to initially sort the items prior to loading the table when the window is first displayed.

Ah, never mind my first answer. Exactly how are you doing this (code)? When? Are you sure you aren't setting it to nil by accident? Are you using these at all, and if so, how:

/*
 * Persistence methods
 */
- (void)setAutosaveName:(NSString *)name;
- (NSString *)autosaveName;

/* On Mac OS 10.4 and higher, the NSTableColumn width and location is saved. On Mac OS 10.5 and higher, the NSTableColumn 'isHidden' state is also saved. The 'autosaveName' must be set for 'autosaveTableColumns' to take effect.
*/
- (void)setAutosaveTableColumns:(BOOL)save;
- (BOOL)autosaveTableColumns;


corbin

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to