• 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: [ANN] Cocoa Style for ObjC: 1 and 2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] Cocoa Style for ObjC: 1 and 2


  • Subject: Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • From: Scott Stevenson <email@hidden>
  • Date: Wed, 27 Oct 2004 00:06:31 -0700


On Oct 26, 2004, at 11:47 PM, M. Uli Kusterer wrote:

Niiice :-)

Thanks.


One note: Your choice of selector names for singletons isn't necessarily the only one. IIRC the only place in Cocoa where "shared" is used is NSWorkspace, and probably not because it's a singleton, but rather because the object seems to be shared between applications

It's not the only one. Here are a few:

NSFontManager +sharedFontManager
NSFontManager +sharedFontPanel
NSColorPanel +sharedColorPanel
NSPrintInfo +sharedPrintInfo
NSHTTPCookieStorage +sharedCookieStorage
NSHelpManager +sharedHelpManager

You might be right about the "shared" bit meaning shared between applications, though I haven't seen any Apple document that specifies this.


Though +NSApplication sharedApplication is the second one in favor of your choice... still, I'm not sure this is an area that doesn't necessarily have a standard prefix.

Yup.

- Scott


--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]

_______________________________________________
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
  • Follow-Ups:
    • Re: [ANN] Cocoa Style for ObjC: 1 and 2
      • From: Ken Ferry <email@hidden>
References: 
 >[ANN] Cocoa Style for ObjC: 1 and 2 (From: Scott Stevenson <email@hidden>)
 >Re: [ANN] Cocoa Style for ObjC: 1 and 2 (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: [Moderator] Re: Cocoa-Java and the Future
  • Next by Date: Re: Object scope - or where to put objects that should always be accessible
  • Previous by thread: Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • Next by thread: Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • Index(es):
    • Date
    • Thread