Re: string convertion: converting getter name to setter
Re: string convertion: converting getter name to setter
- Subject: Re: string convertion: converting getter name to setter
- From: Andrew Merenbach <email@hidden>
- Date: Thu, 4 Sep 2008 18:50:46 -0700
On Sep 4, 2008, at 6:37 PM, Phil wrote:
On Fri, Sep 5, 2008 at 1:27 PM, Andrew Merenbach
<email@hidden> wrote:
SEL getterSel = @selector(balloonColor);
NSString *getterName = NSStringFromSelector(getterSel);
NSString *setterName = [@"set" stringByAppendingString:getterName];
SEL setterSel = NSSelectorFromString(setterName);
Selector's are case-sensitive, so you'll have to do...
setterName = [@"set stringByAppendingString:[getterName
capitalizedString]];
Phil
Hi, Phil,
I did indeed overlook this aspect. Thanks for pointing that out!
Cheers,
Andrew
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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