• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
checkbox suddenly won't change state
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: checkbox suddenly won't change state
      • From: Ron Medina Ballesteros <email@hidden>
    • Re: checkbox suddenly won't change state
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: XCode & Contextual Menu Plugins
  • Next by Date: Re: Screensaver on Jaguar
  • Previous by thread: XCode & Contextual Menu Plugins
  • Next by thread: Re: checkbox suddenly won't change state
  • Index(es):
    • Date
    • Thread