Re: NSString category name collision?
Re: NSString category name collision?
- Subject: Re: NSString category name collision?
- From: Jens Alfke <email@hidden>
- Date: Tue, 26 Jan 2010 09:28:53 -0800
On Jan 26, 2010, at 8:08 AM, email@hidden wrote:
Is this just one of the things we have to put up with as the price
for dynamism or can this problem be pre-empted?
I added a name space prefix to my method definition and the
exception departed.
Yes. To avoid these kinds of collisions, if you add a category method
to an external class you should add some sort of hopefully-unique
prefix to its name. In my Mooseyard software I use the same prefix I
use for my class names ("MY") only lowercased, with an underscore —
e.g. -[NSString my_rot13].
—Jens_______________________________________________
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