Am 23.02.2010 um 11:09 Uhr schrieb charisse napeÿfffff1as:

I am not sure if this problem has already been submitted but how do I define two APIs, one that is supported from Leopard down and another that is only supported in Snow Leopard if I only have one binary for all OSes?

See

http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/cross_development/

I tried using the #if conditionals e.g. #if MAC_OS_X_VERSION_MAX_ALLOWED ...... but my application crashes. It will successfully build on compile time but crashes during runtime

It sounds like you build for the 10.6 SDK but expect the code to run on earlier systems. That will not work. You could decide at runtime which API to use, but in the case you mentioned, that's of no value. While - beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo : is deprecated, it's still there in 10.6. So you don't gain anything by not using it. I suggest you only move over to the new API when you don't have to support older systems any more.


Andreas_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to