Re: What to use instead of operatingSystemVersionString
Re: What to use instead of operatingSystemVersionString
- Subject: Re: What to use instead of operatingSystemVersionString
- From: Sean McBride <email@hidden>
- Date: Fri, 24 Feb 2012 11:55:02 -0500
- Organization: Rogue Research Inc.
On Fri, 24 Feb 2012 13:56:08 +0700, Gerriet M. Denkmann said:
>The documentation says of NSProcessInfo operatingSystemVersionString:
>"This string is not appropriate for parsing". But if fails to mention
>what to use instead.
>
>So what should I use? Gestalt? Or is there some more convenient Cocoa
>alternative?
>
>(I need this info for a bug workaround which occurs only in 10.6.)
Depending on what your needs/purpose is, as Stephane says, NSAppKitVersionNumber may be your best choice. Weak linking and doesRespondToSelector: are also useful. If you use Gestalt, you should do this:
SInt32 major = 0;
(void)Gestalt (gestaltSystemVersionMajor, &major);
SInt32 minor = 0;
(void)Gestalt (gestaltSystemVersionMinor, &minor);
SInt32 fix = 0;
(void)Gestalt (gestaltSystemVersionBugFix, &fix);
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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