• 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
Re: Check box cell in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check box cell in NSTableView


  • Subject: Re: Check box cell in NSTableView
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 11 Mar 2008 15:22:15 +0000

I recently put together a sequence of interlinked NSTableViews using checkbox cells.
It displays the mixed state without problem. So no bug I think.


I used a datasource in this case, as below.

- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn row: (NSInteger)rowIndex
{


	// for the checkbox column

		if ([scriptHandler count] == [scriptHandler publishedCount]) {
			state = NSOnState;
		} else if ([scriptHandler publishedCount] > 0) {
			state = NSMixedState;
		} else {
			state = NSOffState;
		}

		return [NSNumber numberWithInt:state];

}


It doesn't matter if I do the

[myCheckBox setState:NSMixedState];

the result is the same, the checkbox is shown as checked.

If I however use the same code (or even click all the three states) in
an ordinary check box (not cell), everything works as I expect it to do.


This makes me suspect this to be a bug.

Ivan

Den 11. mars. 2008 kl. 14:42 skrev Stephane Sudre:

>
> On Mar 11, 2008, at 13:15, Ivan C Myrvold wrote:
>

>> I can not get my check boxes in an NSTableColumn to show the mixed
>> state.
>> The first time I click an empty check box, it shows as if it is
>> checked, it should have been mixed.

>
> A mixed state can not be determined by a click.
>
> What a click should do:
>
>     Unchecked -> Checked
>
>     Mixed -> Checked
>
>     Checked -> Unchecked
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Check box cell in NSTableView
  • Next by Date: [MEET]: Los Angeles CocoaHeads Thursday March 13th 7:30pm
  • Previous by thread: Re: Check box cell in NSTableView
  • Next by thread: Is CoreData dead?
  • Index(es):
    • Date
    • Thread