Re: Checking OS Version with Cocoa
Re: Checking OS Version with Cocoa
- Subject: Re: Checking OS Version with Cocoa
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 04 Jan 2003 17:50:50 -0500
on 03-01-04 5:12 PM, Jim Correia at email@hidden wrote:
>
On Saturday, January 4, 2003, at 04:56 PM, Chad Armstrong wrote:
>
>
> Is there a way to check a machine's OS version using Cocoa? I've
>
> searched through some books, the web, and even these archives and
>
> didn't find anything right off hand. I've seen some Carbon code in
>
> doing this, but not Cocoa.
>
>
Is there a reason why you can't just use the "Carbon" code?
My book shows you a way to do it in Cocoa, and the technique is even
sanctioned by Apple. It involves getting the version of the AppKit or
Foundation and comparing it with published or easily found AppKit or
Foundation versions for major releases of Mac OS X.
But Jim's gestalt technique is easier, faster, and more accurate, so you
should use it. In particular, the Cocoa technique doesn't distinguish
intermediate "dot" releases, if I recall correctly.
I'm in the middle of a big project that's mostly Cocoa, but I have to use a
lot of Carbon and CoreServices stuff, too. They mesh together perfectly
well, once you get used to it.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.