• 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
KVC keys vs acronym accessors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KVC keys vs acronym accessors


  • Subject: KVC keys vs acronym accessors
  • From: Matt Gough <email@hidden>
  • Date: Wed, 30 Nov 2005 13:06:33 +0000

The 'standard' naming convention for accessors of acronyms seems to be of the following form:

-(id) URLString;

-(void) setURLString:(id)someString;

which goes against the normal capitalization for non-acronyms, but is sensible.

The question is, if I want to make such a class KVC compliant, should my key be 'url', 'uRL' or 'URL'?

Assuming it is 'url', do I need to provide the following, or is the default implementation of valueForKey and setValueForKey smart enough to find the above accessors?


-(id) urlString: { return [self URLString]; }

-(void) setUrlString:(id)someString;
{
[self setURLString:someString];
}

Thanks

Matt Gough
_______________________________________________
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


  • Prev by Date: Date constants in predicates
  • Next by Date: Re: Warnings that won't go away
  • Previous by thread: Re: Date constants in predicates
  • Next by thread: bindings and NSNumberFormatter
  • Index(es):
    • Date
    • Thread