• 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: Shaun Wexler <email@hidden>
  • Date: Sun, 10 Apr 2005 23:35:17 -0700

On Apr 9, 2005, at 9:16 PM, Dan Saul wrote:

Hello there, I am having trouble getting my code to detect the current
operating system using Gestalt, I am running 10.3.

typedef enum { TRVersionNotChecked = -2, TRUnknownVersion, TRCheetahVersion, TRPumaVersion, TRJaguarVersion, TRPantherVersion, TRTigerVersion } TROperatingSystemVersion;

+ (TROperatingSystemVersion)operatingSystemVersion
{
static operatingSystemVersion = TRVersionNotChecked;
if (operatingSystemVersion == TRVersionNotChecked)
{
long response;
if (Gestalt(gestaltSystemVersion, &response) != noErr) {
[NSException raise:@"Gestalt Exception" format:@"gestaltSystemVersion failed"];
}
if (response >= 0x1050 || response < 0x1000) {
operatingSystemVersion = TRUnknownVersion;
}
else if (response >= 0x1040) {
operatingSystemVersion = TRTigerVersion;
}
else if (response >= 0x1030) {
operatingSystemVersion = TRPantherVersion;
}
else if (response >= 0x1020) {
operatingSystemVersion = TRJaguarVersion;
}
else if (response >= 0x1010) {
operatingSystemVersion = TRPumaVersion;
}
else if (response >= 0x1000) {
operatingSystemVersion = TRCheetahVersion;
}
}


	return operatingSystemVersion;
}
--
Shaun Wexler
MacFOH
http://www.macfoh.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Getting Current System Version
      • From: Shaun Wexler <email@hidden>
References: 
 >Getting Current System Version (From: Dan Saul <email@hidden>)

  • Prev by Date: Re: Using wildcards in string comparison
  • Next by Date: Re: Getting Current System Version
  • Previous by thread: Re: Getting Current System Version
  • Next by thread: Re: Getting Current System Version
  • Index(es):
    • Date
    • Thread