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: Kyle Sluder <email@hidden>
- Date: Tue, 8 Sep 2009 15:33:28 -0700
On Tue, Sep 8, 2009 at 3:25 PM, Brent Gulanowski<email@hidden> wrote:
> For classes, you can check whether NSClassFromString(@"Classname") returns a
> class.
This might return incompatible private versions of some classes. For
example, NSClassFromString(@"QLPreviewPanel") will return a class with
a very different API on 10.5 than it does on 10.6.
> For selectors, you can check whether NSSelectorFromString(@"selector")
> returns a selector.
This is untrue. NSSelectorFromString always returns a selector.
> Usually that's enough. In fact, if you pick a representative class that was
> introduced in the OS release of your choice, you can use that as a short cut
> to check for the OS version. Or you can check the version major and minor
> values using Gestalt for accurate version info:
Do not use NSClassFromString to check for OS versions. There is
absolutely no guarantee it will work.
--Kyle Sluder
_______________________________________________
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