• 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: Unique Category Names?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unique Category Names?


  • Subject: Re: Unique Category Names?
  • From: Ricky Sharp <email@hidden>
  • Date: Tue, 19 Apr 2005 17:52:42 -0500

On Apr 19, 2005, at 5:22 PM, Jonathon Mah wrote:

Quick question: I get the feeling from doing some 'Net searches that category names should be unique, but haven't found a definitive source. Is this true? If so, why?

Having unique names will allow you to avoid any potential collisions.

For my own needs, I put category names into three groups:

(1) Private methods in my own classes. Here, the category name is simply "Private"

(2) Categories on Apple's classes (e.g. NSString). Here, I prefix the Category with my two-character prefix of "II"

(3) Public categories on my own classes. While the two-character prefix isn't needed here (since I'm the only user of these classes), I still use the prefix for consistency sake. Plus, if I ever push these classes into a framework consumable by others, that will help remove any potential collisions. Rule would be that the developer prefix their own category names appropriately.

So while I can break things down in three groups, I currently apply two different rules.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Unique Category Names? (From: Jonathon Mah <email@hidden>)

  • Prev by Date: Re: Feature suggestions for easier debugging of Cocoa Bindings.
  • Next by Date: Using NSCell in a custom view?
  • Previous by thread: Unique Category Names?
  • Next by thread: Re: Unique Category Names?
  • Index(es):
    • Date
    • Thread