• 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: mouse click events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mouse click events


  • Subject: Re: mouse click events
  • From: Pandaa <email@hidden>
  • Date: Sat, 15 May 2004 02:33:40 +0200

I was just following the examples from the Cocoa documentation. I guess you say it's better to handle different events in their own method call rather than looping until an event has occurred.

It's better because blocking for events easily disrupts expected runloop behavior, causing timers to misfire or blocking key commands to other parts of your app.

Makes sense, of course, but then I don't understand why the examples show you to loop until an exiting event has occurred.

They're probably just old. Even some official Cocoa classes, like NSSliderCell, used to do polling. Had to work around that once by a subclass, as it was interfering with animated user feedback.

By the way, what did you mean by "Have your double click semantics be a superset of the single click semantics."

That the meaning of a double click should expand upon the meaning of a single click. Take the Finder as an example, a single click selects an item and a double click selects and opens an item. If you go further and define semantics for triple etc clicks they too should expand the meaning.

Since multiple clicking is inherently sequential this should be reflected in the relationship between the effect of each click. Successive semantic refinement or expansion of the meaning of the mouse clicks is probably the most intuitive way model this.

Single and double clicks are not separate or isolated events, and it is inherently confusing if their meanings in your application are.

Here's what I was thinking about doing to handle the single click event. In effect, holding down the mouse and letting go after 500ms will produce one action

(say, a menu pop-up),

There's a standard command for contextual menu commands, ctrl + click or right click.

while double clicking within the same time threshold will produce another action.

I don't know the context, it may make sense, but taken on its' own this is probably broken design.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. email@hidden . . www.synapticpulse.net .
_______________________________________________
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: mouse click events
      • From: "David Piasecki" <email@hidden>
References: 
 >mouse click events (From: "David Piasecki" <email@hidden>)
 >Re: mouse click events (From: Pandaa <email@hidden>)
 >Re: mouse click events (From: "David Piasecki" <email@hidden>)

  • Prev by Date: Re: mouse click events
  • Next by Date: Re: mouse click events
  • Previous by thread: Re: mouse click events
  • Next by thread: Re: mouse click events
  • Index(es):
    • Date
    • Thread