TableColumn identifiers
TableColumn identifiers
- Subject: TableColumn identifiers
- From: Lorenzo Puleo <email@hidden>
- Date: Tue, 06 Jan 2004 11:50:42 +0100
Hi,
I would like to create a table like Excel where the user can delete rows and
columns. I have two questions.
1) -------------
I don't know how to create the row-header. I see only the column header as
ready-to-use option. How to create the row-header?
2) -------------
In order to draw the content of the cells I use the function
- (id) tableView:(NSTableView*)tableView
objectValueForTableColumn:(NSTableColumn*)tableColumn
row:(int)row
this function gives me the tableColumn and the row index. So, in order to
get the column value I am forced to use an identifier like
NSString *identifier = [tableColumn identifier];
and this is not so good for me because I really need the index of the
column, because as I wrote above the user can delete the cells. And, if the
user deletes a column I would loose the column identifier. I am thinking to
this solution: I create initially a given number of columns programmatically
and I give each column the progressive identifier like @"1", @"2", ect.
When the user deletes a column, I really don't delete the column but I
delete the data-column-array then I add an empty data-column-array at the
end of the table. Do you think I am right?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.