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: Graham Cox <email@hidden>
- Date: Fri, 28 Nov 2008 11:52:38 +1100
On 28 Nov 2008, at 11:46 am, Bill Bumgarner wrote:
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.
In which case Apple should a) explicitly document this as a no-no, and
b) disallow categories to install methods that already exist. I would
have thought b) was possible, as when loading a category, I assume
what's really happening is that the method table for the class is
being populated. If the "slot" is already occupied, just don't install
that method.
What use is it, if it's such a bad idea?
--Graham
_______________________________________________
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