On Feb 25, 2008, at 4:41 PM, Quincey Morris wrote:
What I was asking about is whether (for example, and assuming a
column is selected)
[[tableView tableColumns] objectAtIndex: [tableView selectedColumn]]
is in fact the NSTableColumn that's selected. It seems likely, but
the documentation does not say, that the order of the NSTableColumns
in [NSTableView tableColumns] is the same as the current visible
order of the columns in the table.
And it actually hints to the contrary, since -tableColumns is document
to include the hidden columns as well (and doesn't say if they are at
the end or in the middle)
However, as long as you only refer to your table columns by their
identifiers, you can ignore it one way or the other. For example, if
you want to know if the column whose identifier is "Name" is the
selected column, you can do something like:
if ([[table isColumnSelected: [table columnWithIdentifier: @"Name"]]) {
// the column "Name" is selected
}
By adapting the practice of using the column identifier, not only do
you get past this problem, you won't have any problem if you allow the
user to re-order columns.
Glenn Andreas [EMAIL PROTECTED]
<http://www.gandreas.com/> wicked fun!
quadrium | prime : build, mutate, evolve, animate : the next
generation of fractal art
_______________________________________________
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]