Re: Loop through NSTableView to set NSCell state
Re: Loop through NSTableView to set NSCell state
- Subject: Re: Loop through NSTableView to set NSCell state
- From: Andy Lee <email@hidden>
- Date: Sun, 14 Apr 2002 13:28:21 -0400
At 4:44 PM +0200 4/14/02, j o a r wrote:
I would suggest that you set the button state through the table view
delegate methods provided, something like this:
- (void)tableView:(NSTableView *)aTableView
willDisplayCell:(id)aCell forTableColumn:(NSTableColumn
*)aTableColumn row:(int)rowIndex
{
if ([[aCell stringValue] isEqualToString:@"someStringValue"]) {
[aCell setNextState]; // If this is the right way
to set the state
Onar, you shouldn't use -setNextState, though I know you said you
wanted to and joar is just going along with you here. You should
figure out which particular state the cell should have and assign
that state explicitly. You don't want to make any assumptions about
what the *current* state of the cell is -- especially since (I think)
the same actual NSCell instance gets reused over and over to display
each cell within a column.
--Andy
_______________________________________________
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.