• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting Current System Version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Getting Current System Version (From: Dan Saul <email@hidden>)

  • Prev by Date: Re: Memory management of NSStrings
  • Next by Date: Re: Memory management of NSStrings
  • Previous by thread: Getting Current System Version
  • Next by thread: Re: Getting Current System Version
  • Index(es):
    • Date
    • Thread