• 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
NSTableView CheckBoxes & selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView CheckBoxes & selection


  • Subject: NSTableView CheckBoxes & selection
  • From: Bertrand Landry-Hetu <email@hidden>
  • Date: Mon, 4 Jul 2005 18:45:08 -0700

Hi all,

So I have a form the user needs to pick a number of option that I show
as an NSTableView with 2 columns one with the check box the other with
the text describing it. Basically the action the form does affects
every object the user selected with the check box. But since the table
view insist on selecting rows the user clicked in, it gets confusing
on what is really selected.

So I'm trying to stop the selection from showing. I searched this list
and the only thing I found that worked to a certain degree was
overriding mouseDown: for the table using the EDTableView that was
suggested. Problem is: that code does not work with bindings!

So at the core of the mouseDown:

if([cell trackMouse:theEvent inRect:cellFrame ofView:self
untilMouseUp: [[cell class] prefersTrackingUntilMouseUp]])
{
    id newValue = [cell objectValue];
    if ([column isEditable] && ![originalValue isEqual: newValue])
    {
        [self delegateSetObjectValue: newValue
                            forTableColumn: column
                                              row: clickedRowIdx];
     }
}

so trackMouse: does set the corresponding binding to 0, but won't make
it to 1. newValue does have a value of 1. I think the idea would be to
do a binding equivalent of setObjectValue but for bindings, but I
don't see anyway to get that done. Especially since its the column
object that gets bound to the arrayController, not the tableView.

Any suggestions ?

Thanks.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Getting NSMetadataQuery to sort properly
  • Next by Date: Re: table binding/core data
  • Previous by thread: Re: Getting NSMetadataQuery to sort properly
  • Next by thread: NSPredicate & Spotlight query strings
  • Index(es):
    • Date
    • Thread