Re: Checkboxes in an NSTableView
Re: Checkboxes in an NSTableView
- Subject: Re: Checkboxes in an NSTableView
- From: Laurent Daudelin <email@hidden>
- Date: Thu, 26 Feb 2004 18:59:34 -0500
on 26/02/04 18:31, Brant Sears at email@hidden wrote:
>
I have an NSTableView that has a column of checkboxes. I'm attempting to
>
programatically toggle the value of some of these boxes. I have code that
>
acquires a reference to the cell by calling:
>
>
NSCell* theCell = [myTableColumn dataCellForRow: theRowIndex];
>
>
So, now I have an NSCell * which seems to be an NSButtonCell pointer which
>
is what I would expect. I've attempted to call performClick on it. I've also
>
tried calling [theCell setIntValue: NSOnState] (or NSOffState) which also
>
doesn't work.
>
>
I've even tried to enable or disable the button cell which apparently I
>
can't do either.
>
>
Any ideas on how I can accomplish the goal of programatically toggling the
>
checkbox cells?
I believe that you can provide the values for those cells from your
tableview datasource object, by returning something like:
return [NSNumber numberWithInt:NSOnState];
-Laurent.
--
============================================================================
Laurent Daudelin AIM/iChat: LaurentDaudelin <
http://nemesys.dyndns.org>
Logiciels Nemesys Software
mailto:email@hidden
Blue Screen of Death n.: [common] This term is closely related to the older
Black Screen of Death but much more common (many non-hackers have picked it
up). Due to the extreme fragility and bugginess of Microsoft Windows,
misbehaving applications can readily crash the OS (and the OS sometimes
crashes itself spontaneously). The Blue Screen of Death, sometimes decorated
with hex error codes, is what you get when this happens. (Commonly
abbreviated BSOD.)
_______________________________________________
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.