KVC keys vs acronym accessors
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