Re: Class responds to selector?
Re: Class responds to selector?
- Subject: Re: Class responds to selector?
- From: j o a r <email@hidden>
- Date: Mon, 25 Jul 2005 13:32:35 +0200
On 25 jul 2005, at 13.14, Theodore H. Smith wrote:
OK, so I can use respondsToSelector: to ask if an object responds
to a selector.
But what about telling if a class responds to a selector?
This code here:
if ( ! [NSColor instancesRespondToSelector: @selector
(controlAlternatingRowBackgroundColors) ] ) {
return [NSColor whiteColor];
}
returns false when actually NSColor the class does actually respond
to controlAlternatingRowBackgroundColors.
The method returns the correct answer. The instances of NSColor
doesn't respond to that selector. Have you tried calling
"respondsToSelector" to ask the class object if it responds or not?
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden