• 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: NSTableView updating checkboxes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTableView updating checkboxes
      • From: Jo Phils <email@hidden>
References: 
 >NSTableView updating checkboxes (From: Jo Phils <email@hidden>)
 >Re: NSTableView updating checkboxes (From: Graham Cox <email@hidden>)
 >Re: NSTableView updating checkboxes (From: Jo Phils <email@hidden>)
 >Re: NSTableView updating checkboxes (From: Graham Cox <email@hidden>)
 >Re: NSTableView updating checkboxes (From: Jo Phils <email@hidden>)
 >Re: NSTableView updating checkboxes (From: Jo Phils <email@hidden>)

  • Prev by Date: Re: How can main thread be blocked in mach_msg_trap?
  • Next by Date: Re: MacRoman -> UTF8 [solved]
  • Previous by thread: Re: NSTableView updating checkboxes
  • Next by thread: Re: NSTableView updating checkboxes
  • Index(es):
    • Date
    • Thread