Re: Framework versioning and handling multiple OS SDK's?
Re: Framework versioning and handling multiple OS SDK's?
- Subject: Re: Framework versioning and handling multiple OS SDK's?
- From: Brent Gulanowski <email@hidden>
- Date: Tue, 8 Sep 2009 22:39:39 -0400
Of course. I wasn't thinking straight. Sorry for the misinformation.
On Tue, Sep 8, 2009 at 6:33 PM, Greg Parker <email@hidden> wrote:
> On Sep 8, 2009, at 3:25 PM, Brent Gulanowski wrote:
>
>> For selectors, you can check whether NSSelectorFromString(@"selector")
>> returns a selector.
>>
>
> That won't do what you want. NSSelectorFromString() always returns a
> selector; it creates one itself if that name has not been used yet. (And
> "not used yet" differs from "does not exist" anyway; the runtime manipulates
> selectors as lazily as it can.)
>
> Try these instead:
> [NSClassFromString(@"SomeClass") respondsToSelector:@selector
> (someClassMethod)];
> [NSClassFromString(@"SomeClass") instancesRespondToSelector:@selector
> (someInstanceMethod)];
>
>
> --
> Greg Parker email@hidden Runtime Wrangler
>
>
>
--
Brent Gulanowski
_______________________________________________
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