• 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: The Amazing Llama <email@hidden>
  • Date: Wed, 27 Oct 2004 13:08:27 -0700

On Oct 26, 2004, at 4:25 PM, Scott Stevenson wrote:
I've just posted a two-part tutorial on style conventions for Cocoa using Objective-C:

http://cocoadevcentral.com/articles/000082.php
http://cocoadevcentral.com/articles/000083.php

Something that I've started to do, to make life simpler, is to start naming dictionaries in the format

returnType + By + keyType

for instance,

infoByURL (a dictionary of URL objects pointing to "info" objects)
pagesByDate (a dictionary of date objects pointing to "page" arrays (because of the plural))

etc. This makes it very easy to use later on, when you might have multiple dictionaries pointing to the same data via different keys. It is also relatively easy to expand this to accessors,

-infoForURL:
or
-infoWithURL:

although I'm still trying to decide which makes more sense, for or with.

Seth A. Roby The Amazing Llama < mail or AIM me at tallama at mac dot com>
"Life is like an exploded clown. It's really funny until you figure out what just happened."

_______________________________________________
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: Andreas Mayer <email@hidden>
    • Re: [ANN] Cocoa Style for ObjC: 1 and 2
      • From: Scott Stevenson <email@hidden>
References: 
 >[ANN] Cocoa Style for ObjC: 1 and 2 (From: Scott Stevenson <email@hidden>)

  • Prev by Date: Re: C-library and framework
  • Next by Date: Re: [OT] Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • 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