• 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: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?


  • Subject: Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
  • From: Bill Bumgarner <email@hidden>
  • Date: Thu, 27 Nov 2008 16:46:55 -0800

On Nov 28, 2008, at 11:24 AM, Graham Cox wrote:
Playing with this, the code below gives a nice "feel" for a big variety of sliders in my app and wraps properly with circular ones too. I was skeptical at first that this was a good idea but trying it out in the app I've quickly come to appreciate how usable it is in practice!

@implementation NSSlider (Scrollwheel)

Do Not Do This. Down this path lies pain and madness.

Implement a subclass and use it throughout your application.

The first software update or major Mac OS X release where Apple adds said method, if Apple were to ever add said method, and you'll be quite thoroughly unhappy. At best, your app's standard sliders will behave in a decidedly non-standard fashion. At worst, your app's standard sliders will crash.

Categories are great for dividing a class's implementation (sometimes across frameworks -- NSAttributedString in Foundation and AppKit, for example) and great for adding new functionality to existing classes in isolation. But they are not meant for and not good for overriding existing behavior or modifying an existing class to respond to existing behaviors in a new way.

b.bum
_______________________________________________

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: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
      • From: Graham Cox <email@hidden>
    • Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
      • From: Graham Cox <email@hidden>
References: 
 >What is the best way to get an NSSlider to respond to the mouse scroll wheel? (From: "Michael A. Crawford" <email@hidden>)
 >Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel? (From: Graham Cox <email@hidden>)
 >Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Can I split an implementation file?
  • Next by Date: Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
  • Previous by thread: Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
  • Next by thread: Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
  • Index(es):
    • Date
    • Thread