On Jul 1, 2010, at 9:14 AM, Michael Ash <michael....@gmail.com> wrote:
> On Thu, Jul 1, 2010 at 12:05 PM, Michael Ash <michael....@gmail.com> wrote: >> An extremely minor nitpick: the use of +class here is necessary. > > Of course I meant to write that the use of +class here is UNnecessary. Sigh. And it can actually get you into trouble. +class returns self, so this won't do what you might think at first: [[SomeClass class] instancesRespondToSelector:@selector(foo)] One might think that asks if the SomeClass class object responds to foo, following the logic that [SomeClass class] would return SomeClass's metaclass. In fact, as Mike describes, it is equivalent to [SomeClass instancesRespondToSelector:@selector(foo)]. --Kyle Sluder_______________________________________________ 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