Re: Little question on kCFCoreFoundationVersionNumber
Re: Little question on kCFCoreFoundationVersionNumber
- Subject: Re: Little question on kCFCoreFoundationVersionNumber
- From: Shawn Erickson <email@hidden>
- Date: Mon, 29 Sep 2003 13:55:41 -0700
So it is... IMO it is strange that is has a 'k' in front of it then but
I guess it does make sense. Often constants like that are done as
#defines or enums not global constant variables. Also I saw the
following in my quick code search so I assumed it was all macro based.
#define kCFCoreFoundationVersionNumber10_0 196.4
Sorry for the confusion.
-Shawn
On Monday, September 29, 2003, at 10:26 AM, Stiphane Sudre wrote:
>
It's really a runtime double value. I just checked this on a 10.2 and
>
10.1 OS and the built tool is returning different values.
>
>
It's the API version I'm interested in as I need to check whether a
>
method is available or not.
>
>
On lundi, sep 29, 2003, at 18:26 Europe/Paris, Shawn Erickson wrote:
>
>
>
>
> On Monday, September 29, 2003, at 08:54 AM, Stiphane Sudre wrote:
>
>
>
>> kCFCoreFoundationVersionNumber
>
>
>
> You cannot use the above to know what version of OS your Application
>
> is running on. It is a _compile_ time macro not a runtime check.
>
>
>
> Try reading over the following tech. note.
>
>
>
> http://developer.apple.com/technotes/tn2002/tn2064.html
>
>
>
> If you really want to know the OS version, not just if an API /
>
> method is supported then consider using Gestalt [1].
>
>
>
> OSStatus status;
>
> SInt32 response;
>
>
>
> status = Gestalt(gestaltSystemVersion, &response);
>
> if (status != noErr)
>
> response = 0;
>
>
>
> if (response >= 0x1030)
>
> {
>
> // we are running on 10.3 or later
>
> }
>
>
>
> -Shawn
>
>
>
> [1] Code suggested by Jim Correia on the Apple Mac OS X dev list.
>
_______________________________________________
>
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.
_______________________________________________
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.