• 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: "Michael A. Crawford" <email@hidden>
  • Date: Sun, 07 Dec 2008 11:08:13 -0800


Well, I don't know if you guys are still listening on this thread but, for the record, I did put Graham's suggestion into practice, immediately. It was fast, easy, and simple to modify when I wanted to tweak the behavior to use float values instead of integers. Thanks, Graham.


After going back and reading the entire thread (just now), I have decided to remove Graham's solution and go with the recommendation, from Michael and Bill, to use inheritance instead. I also appreciated Sherm's suggestion as a good solution to consider in the future any time I need to do something like this and decide to use categories, but want to be more intelligent about it. I don't have a lot of experience with categories and I'm not sure that, if Apple did make changes and code broke, I would remember or recognize that this category might be the culprit. The problem is that I'm inexperienced and new to a lot of the deeper concepts in Objective-C, I barely understand how categories do what they do. I'm a C++ guy. I'm sure the underlying details are similar but in all honestly don't want to waste my time trying to master this. I just want to finish my application.

Thanks again, for all the great input and the lively debate.

-Michael

On Nov 27, 2008, at 9:37 PM, Sherm Pendley wrote:

On Nov 27, 2008, at 7:24 PM, Graham Cox wrote:

Yep, that's a potentially more serious issue. It would be nice if a category had a way to check for an existing implementation and quietly no-op itself. Just checking respondsToSelector: doesn't work of course, always returning YES.

Build your category methods into a loadable bundle. Check with respondsToSelector:, and if it returns NO, load the bundle.


sherm--


-Michael
----------------------
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies.
And the other way is to make it so complicated that there are no obvious deficiencies.


-- C.A.R. Hoare


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Prev by Date: Re: Window moving during drag and drop operation, (newbiew question)
  • Next by Date: NSPredicateEditor and date comparisons
  • Previous by thread: Re: 3-float struct?
  • Next by thread: NSTreeController, NSOutlineView, and a leak?
  • Index(es):
    • Date
    • Thread