checkbox suddenly won't change state
checkbox suddenly won't change state
- Subject: checkbox suddenly won't change state
- From: Donald Hall <email@hidden>
- Date: Wed, 31 Dec 2003 00:36:01 -0700
I have a table view that has a checkbox in one column. I set up the
checkbox programmatically in windowControllerDidLoadNib:
prototypeCell = [[[NSButtonCell alloc] initTextCell: @""] autorelease];
[prototypeCell setEditable: YES];
[prototypeCell setButtonType:NSSwitchButton];
[prototypeCell setImagePosition:NSImageOnly];
[prototypeCell setControlSize:NSSmallControlSize];
tableColumn = [theTableView tableColumnWithIdentifier:@"active"];
[tableColumn setDataCell:prototypeCell]; // check box in column 0
This has worked well for months. Tonight I just noticed that clicking
on the checkbox no longer causes it to change state as it should.
(However, it does show the initial state correctly - this is
determined by the table's data source.)
I added another statement:
[prototypeCell setAction: @selector(activeActionsListChanged)];
This method is called when I click on the checkbox, but attempting to
change the state in it with:
[[[theTableView tableColumnWithIdentifier:@"active"] dataCell] nextState];
does not seem to have any effect.
I am at a loss as to where to look to find the problem. Does anyone
have any suggestions as to where to look? I did subclass NSTableView,
but did not override any methods associated with clicking, just
background drawing.
Thanks for any insights,
Don
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
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.