Re: NSTableView updating checkboxes
Re: NSTableView updating checkboxes
- Subject: Re: NSTableView updating checkboxes
- From: Jo Phils <email@hidden>
- Date: Sun, 22 Mar 2009 18:21:07 -0700 (PDT)
Thank you Andrew (and Graham),
I think i'm finally realizing that! :-) Thank you very much. Ok I still don't have it yet but it's back to work for me and hopefully the next time I post back I'll finally have it... :-)
Thanks again,
Rick
________________________________
From: Andrew Farmer <email@hidden>
To: Jo Phils <email@hidden>
Cc: Graham Cox <email@hidden>; email@hidden
Sent: Sunday, March 22, 2009 3:45:12 PM
Subject: Re: NSTableView updating checkboxes
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