• 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: Determining OS at Runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining OS at Runtime


  • Subject: Re: Determining OS at Runtime
  • From: Clark Cox <email@hidden>
  • Date: Thu, 2 Jul 2009 17:46:44 -0700

On Thu, Jul 2, 2009 at 4:33 PM, Dave DeLong<email@hidden> wrote:
> One way that I've seen used is to do this:
>
> BOOL isLeopardOrBetter = YES;
> Class gcClass = NSClassFromString(@"NSGarbageCollector");
> if (gcClass == nil) { isLeopardOrBetter = NO; }

Don't do that. Check for the specific feature that you want to use.
I.e. this code is fine if you want to check for the presence of
NSGarbageCollector, however, that's exceeding unlikely, as you already
know whether or not your code supports GC at compile time.

--
Clark S. Cox III
email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Determining OS at Runtime (From: iseecolors <email@hidden>)
 >Re: Determining OS at Runtime (From: Sherm Pendley <email@hidden>)
 >Re: Determining OS at Runtime (From: Steve Christensen <email@hidden>)
 >Re: Determining OS at Runtime (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: User interface validation doesn't work, right?
  • Next by Date: Why Applespell.service fail to launch?
  • Previous by thread: Re: Determining OS at Runtime
  • Next by thread: Re: Determining OS at Runtime
  • Index(es):
    • Date
    • Thread