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, <k...@highrolls.net> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/kenferry%40gmail.com

This email sent to kenfe...@gmail.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to