NSCell's -setStringValue:
NSCell's -setStringValue:
- Subject: NSCell's -setStringValue:
- From: Daniel Todd Currie <email@hidden>
- Date: Mon, 17 May 2004 23:09:53 -0700
When i use NSCell's -setStringValue:, what is it actually doing? It's
not changing the table's data source, but it is apparently changing the
cell's width, because [cell cellSize].width is changing as I change the
string value.
I played around with this using the following code:
NSCell *cell = [[myTableView
tableColumnWithIdentifier:@"myIdentifier"] dataCell];
[cell setStringValue:@"test"];
NSLog(@"cell width = %f", [cell cellSize].width);
[cell setStringValue:@"fibula"];
NSLog(@"cell width = %f", [cell cellSize].width);
And the log:
2004-05-17 22:53:30.247 myApp[8699] cell width = 27.594000
2004-05-17 22:53:30.249 myApp[8699] cell width = 39.723999
This ends up doing what I want it to do (it tells me what width the
cell should have for the words "test" and "fibula"), but it bothers me
a little that this method doesn't seem to have any effect. I can't
figure out why this works.
Thanks in advance for any insight...
-- Daniel Currie
_______________________________________________
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.