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 s...@rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com