[CocoaApp isThisTiger]

Christiaan Hofman cmhofman at gmail.com
Mon Oct 22 11:01:08 PDT 2007


I'd say that can be dangerous.A feature (say method) being available  
does not mean that everything you need is available. What if some  
input manager or framework happens to add a method precisely with  
this name? This only works if you check for *every* method you would  
want to use, which is usually fragile and undoable.

I would just check for the appkit version. That is a check that  
basically guarantees existence of a whole bunch of methods.

Christiaan

On 22 Oct 2007, at 7:55 PM, Shawn Erickson wrote:

> On 10/21/07, David Dunham <dunham at mac.com> wrote:
>> I'd like to disable some UI if my Cocoa application is running under
>> Tiger (as opposed to Leopard). Gestalt would work perfectly well, but
>> I wonder what the hard core "no Carbon" Cocoa developers prefer to
>> determine this. Or if AppKit version is preferred.
>
> Check for the existance/lack of a feature that you need at runtime.
> Avoid testing for OS version if possible.
>
> Need to know more about why you want to disable an aspect of UI on
> Tiger to give specifics...
>
> -Shawn



More information about the MacOSX-dev mailing list