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 (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 [EMAIL PROTECTED]