Re: What happens if I use 10.3 functions on 10.2?
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.