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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to