• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString category name collision?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSString category name collision?
      • From: Sherm Pendley <email@hidden>
    • Re: NSString category name collision?
      • From: "email@hidden" <email@hidden>
References: 
 >NSString category name collision? (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: How to access iTunes using cocoa
  • Next by Date: Re: How to access iTunes using cocoa
  • Previous by thread: NSString category name collision?
  • Next by thread: Re: NSString category name collision?
  • Index(es):
    • Date
    • Thread