• 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: What happens if I use 10.3 functions on 10.2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What happens if I use 10.3 functions on 10.2?


  • Subject: Re: What happens if I use 10.3 functions on 10.2?
  • From: Wade Tregaskis <email@hidden>
  • Date: Fri, 30 Jul 2004 11:54:14 +1000

It works save for where I need to use a new class.

There is the NSClassFromString() function in Foundation, which is very useful in this case - it will return nil if the class cannot be found. You can use it either to just if..else your code (in which case it will only build on the newer system, despite running on the older) or using the various other runtime methods on the returned class object to obtain selectors and so forth dynamically, allowing the code to be built on the older system.

This is also very handy for joining two frameworks, without making them dependant on each other.

Wade Tregaskis (aim: wadetregaskis)
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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.


References: 
 >What happens if I use 10.3 functions on 10.2? (From: Felipe Baytelman <email@hidden>)
 >Re: What happens if I use 10.3 functions on 10.2? (From: Clark Cox <email@hidden>)
 >Re: What happens if I use 10.3 functions on 10.2? (From: Hasan Diwan <email@hidden>)

  • Prev by Date: Re: Tiger, File Searching and MetaData
  • Next by Date: Re: [OT] Premature optimizations
  • Previous by thread: Re: What happens if I use 10.3 functions on 10.2?
  • Next by thread: Bindings NSArrayController/NSUserDefaultsController nightmare
  • Index(es):
    • Date
    • Thread