Re: Getting Current System Version
Re: Getting Current System Version
- Subject: Re: Getting Current System Version
- From: Finlay Dobbie <email@hidden>
- Date: Sun, 10 Apr 2005 13:55:37 +0100
On Apr 10, 2005 5:16 AM, Dan Saul <email@hidden> wrote:
> Hello there, I am having trouble getting my code to detect the current
> operating system using Gestalt, I am running 10.3.
<snip>
> case 0x1000:
This matches 10.0.0 but not 10.0.1 (0x1001), 10.0.2 (0x1002), etc
> case 0x1020:
This matches 10.2.0 but not 10.2.1, 10.2.2, etc
There is no case for Puma, and there is no default case. As such, for
most OS releases you're going to get garbage back (you're not
returning any value).
> It always ends up telling me that it is 10.0 (or 0 basically) no
> matter how I create the enum'd value.
You're not returning any value, so you're just getting garbage. The
fact that it happens to be 0 is lucky coincidence.
I haven't had much experiance
> with Gestalt but it seems like I am doing the correct things,
> unfortunately I can't test the current AppKit version or I would.
Why can't you test the AppKit version? What do you want this information for?
-- Finlay
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden