Re: Preserving camelCase when prefixing a method name?
Re: Preserving camelCase when prefixing a method name?
- Subject: Re: Preserving camelCase when prefixing a method name?
- From: Jim Correia <email@hidden>
- Date: Tue, 13 Oct 2009 11:01:47 -0400
On Oct 13, 2009, at 10:24 AM, Graham Cox wrote:
I think just making the first character uppercase would be
sufficient, but I'm not sure how to do that reliably with the
unichar data type, so that's my first question.
Well you don't have to consider all of unicode, just those characters
which are valid language identifiers.
Nonetheless, applying -uppercaseString to the first character should
solve the problem.
The second is that when generating selectors programmatically like
this, are there other pitfalls to consider so that the resulting
selector is always predictable? The scheme needs to work with
arbitrary properties, just as various parts of KVC and KVO do.
Don't forget to account for the pattern often used for BOOL
'properties'. (I put properties in air quotes because actual
properties allow you to specify the getter and setter name.)
-isFlagged
-setFlagged:
- Jim
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden