On Aug 20, 2012, at 2:52 PM, Jens Alfke <j...@mooseyard.com> wrote:

> My first thought was to declare some categories on NSArray and NSDictionary 
> to define those methods, but that's likely to cause issues when iOS 6 comes 
> out and already includes those methods — I'll get compile errors (which I can 
> work around with #ifdefs) but also a warning at launch time because the 
> methods are declared in two places.

You could put a +load method in your category which dynamically adds the 
methods at launch time only if they're not already there.

> (And does this also imply that code using array/dictionary subscripting won't 
> run on OS X 10.7?)

No, Apple says that these features should work on earlier OS X release, as long 
as you're using the modern runtime, probably by using something like the 
runtime trick above.

Charles

_______________________________________________

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

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

Reply via email to