• 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: NSSlider Mouse Up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSlider Mouse Up


  • Subject: Re: NSSlider Mouse Up
  • From: email@hidden
  • Date: Thu, 16 Dec 2010 16:24:55 -0700

After posting I found a Carbon function GetCurrentButtonState;
I call this in my slider action method and if the mouse is up I do my clean up and return otherwise I do the live slider action.
Seems to work just fine.


Am I OK with this?

-koko


On Dec 16, 2010, at 3:54 PM, Ken Ferry wrote:

Hi Koko,

On Thu, Dec 16, 2010 at 2:37 PM, <email@hidden> wrote:
What is the preferred way of receiving an action when the mouse is released in an NSSlider?


The preferred thing is not to do precisely that. It's to have the action method use, say, -performSelector:withObject:afterDelay: and + cancelPreviousPerformRequestsWithTarget:selector:object: to schedule expensive work that cannot be performed too often.

A couple things to note:
(1) Users using full keyboard access or accessibility are not using the mouse, so no mouse up.
(2) According to Apple's human interface group, it is highly desirable that changes made with sliders be live whenever possible. If something is too expensive to do completely live, you still shouldn't wait for mouseUp: to produce the 'real' effect, just avoid doing it every single time the user twitches.


-Ken
Cocoa Frameworks


-koko

_______________________________________________

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


_______________________________________________

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: NSSlider Mouse Up
      • From: Fritz Anderson <email@hidden>
References: 
 >Re: NSSlider Mouse Up (From: Ken Ferry <email@hidden>)

  • Prev by Date: Re: App Will Not Terminate After Uncaught Excpetion
  • Next by Date: Re: NSSlider Mouse Up
  • Previous by thread: Re: NSSlider Mouse Up
  • Next by thread: Re: NSSlider Mouse Up
  • Index(es):
    • Date
    • Thread