Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
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