Double click on a list

Wes Zuber
  • Wes Zuber

    Wes Zuber - 2002-06-07

    Hey is there anyone at all watching this list? Does anyone have any sample code for doing a double click on a list of items? (using the TableView object). I am just hacking up the data access sample and I can't figure out how to respond to a double click.


    • Sherm Pendley

      Sherm Pendley - 2002-06-07

      Yes, I'm here. I haven't figured out how to answer your questions yet, though... Stay tuned.

      • Wes Zuber

        Wes Zuber - 2002-06-08

        Thanks Sherm, I very much like this project. I am anxious to put up more examples for folks.


    • matt

      matt - 2002-06-20
      • Sherm Pendley

        Sherm Pendley - 2002-06-20

        Daddy-o is right-o about the method to use, but I'd like to expand on the explanation a bit.

        When you pass selectors (aka method names) from Perl, they're passed as strings, and if the method the selector describes takes an argument, you need to remember to add the trailing colon to indicate that to the Objective-C runtime.

        Also, because an NSTableView normally has a data source but not a target for its action methods, you'll probably need to call setTarget: as well as setDoubleAction:.

        Here's an example snippet to get you started. As written, this would go in your controller class' constructor, and the doubleClick method would also be in the controller class.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks