Re: NSTableView updating checkboxes
Re: NSTableView updating checkboxes
- Subject: Re: NSTableView updating checkboxes
- From: Andrew Farmer <email@hidden>
- Date: Sun, 22 Mar 2009 00:45:12 -0700
On 21 Mar 09, at 04:04, Jo Phils wrote:
I have taken some time to work on your suggestions...unfortunately I
still can't figure out how to uncheck/recheck the checkboxes by
clicking on them. :-( I understand what you're telling me about
keeping 2 lists and ultimately I will get to the point where I have
to do something with the items being displayed in my table. But for
now I'm still stuck on the checkboxes...
Right now, the method you've got coded:
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex
{
if ([[aTableColumn identifier] isEqualToString:@"column2"])
{
return [NSNumber numberWithInt:NSOnState]; //initializes
checkbox column with boxes all checked
}
return [filenames objectAtIndex:rowIndex];
tells the table that every row is always checked. This method doesn't
"initialize" the table - the table doesn't keep track of anything
itself, it just asks your data source what to display.
_______________________________________________
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