Re: Introspecting the current method
Re: Introspecting the current method
- Subject: Re: Introspecting the current method
- From: Ken Thomases <email@hidden>
- Date: Sun, 18 Apr 2010 21:01:13 -0500
On Apr 18, 2010, at 7:14 PM, Dave DeLong wrote:
> If I'm inside a method, is there a way to know at runtime whether that method is a class or an instance method?
Keep in mind that class methods are just instance methods, where the instance is the class object. (The class object being an instance of its metaclass.)
So, in a deep sense, there's no distinction between a class method and an instance method. There's only the receiver object and the message/selector.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden