• 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 setDoubleAction/NSControl setAction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView setDoubleAction/NSControl setAction


  • Subject: Re: NSTableView setDoubleAction/NSControl setAction
  • From: Angela Brett <email@hidden>
  • Date: Wed, 7 Aug 2002 21:10:39 +1200

At a point in my app I set the actions for a certain NSTableView:

[fileTable setAction:@selector( inspect:)];
[fileTable setDoubleAction:@selector( trueinspect:)];

This works, but with a twist. The single click action works, but the double click action runs *both*. Is this a bug in NSTableView?

I would assume this is how it is supposed to work. Think about it... at the first click, nobody knows whether it's going to be a doubleclick or not, so it has to be treated as a single click. Then when the second click happens the doubleclick action is sent. The first click of a doubleclick should usually do the same thing as a normal click would, because at that stage you don't know whether there's going to be a doubleclick or not.

ProjectBuilder has different actions (showing in a pane or a separate window) for clicking or doubleclicking on files, but there is a delay after the single click before it will show the file, because it has to wait to make sure there isn't going to be another click. You could do something like that by a timer or something in the single click action, so that it wouldn't do its thing until after a certain amount of time without the doubleclick action being called.

I've been reading a book about programming for Windows 3.1 at work (ugh) and it just happens that I read a passage about this very issue a few days ago.
--
Angela Brett
email@hidden
http://acronyms.co.nz/angela
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: NSTableView setDoubleAction/NSControl setAction
      • From: Gerben Wierda <email@hidden>
References: 
 >NSTableView setDoubleAction/NSControl setAction (From: Gerben Wierda <email@hidden>)

  • Prev by Date: Re: Accessor methods and (auto)release: Relationships vs References in ULM
  • Next by Date: Sheet, window closing, application quitting
  • Previous by thread: NSTableView setDoubleAction/NSControl setAction
  • Next by thread: Re: NSTableView setDoubleAction/NSControl setAction
  • Index(es):
    • Date
    • Thread