Re: How to choose different implementations of an object method at runtime?
Re: How to choose different implementations of an object method at runtime?
- Subject: Re: How to choose different implementations of an object method at runtime?
- From: Jens Alfke <email@hidden>
- Date: Thu, 23 Jan 2014 11:45:44 -0800
On Jan 20, 2014, at 12:27 PM, Michael Crawford <email@hidden> wrote:
> As I'm sure you are aware, 10.8 now defines a method that does the same thing using the same name.
That's exactly why you should unambiguously prefix the names of category methods you add to system classes. Collisions are dangerous. Change your method name to "mc_CGColor" or whatever, and this won't be an issue.
—Jens
PS: And let's not turn this into another thread about the need for namespacing in Obj-C. If anyone's interested in the topic they can search for the many, many previous messages on this topic here and in xcode-users and objc-language. And if anyone really needs to post new stuff about it, please use objc-language as the forum.
_______________________________________________
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