-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 9/21/11 2:22 PM, Charles Srstka wrote:
> Why not? I find it to be safer than checking for the existence of
> a method, because you never know if that method might have actually
> have existed before it went public, but in a less stable form or
> with different behavior. If this is the case, then just checking
> whether the method exists and calling it could produce who knows
> what behavior on older systems.

I have always been under the impression that Apple recommends weak
linking and run-time checks.  It's what's covered in the (aging) Tech
Note 2064 for OS X and, IIRC, is what is discussed in, for example,
the original iPad/iOS 3.2 release notes.

What are some examples of breakage happening under this scenario?  I'd
like to be on the lookout myself if I indeed did put too much faith in
the documentation.

> There’s also the case where an API exists, but is buggy on older 
> versions, causing you to want to avoid that API unless you’re
> running at least a certain version of OS X (for example, -[NSURL 
> URLByDeletingLastPathComponent] before Lion).

That is an interesting case that I hadn't really considered, and I
concede that it is a situation where checking the OS version (or, at
least, NSAppKitVersionNumber) may be the best solution.

- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFOemCDaOlrz5+0JdURAk7bAJwII/9jEyqonDSS5lncZTMp/WBQEQCfUnCo
bUmH61OQ2zdcVXxENd1DKXA=
=r7I6
-----END PGP SIGNATURE-----
_______________________________________________

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