Re: Selector not working for me
Re: Selector not working for me
- Subject: Re: Selector not working for me
- From: Heinrich Giesen <email@hidden>
- Date: Mon, 2 May 2005 16:11:16 +0200
(This is a bit OT):
On 02.05.2005, some people wrote:
. . . use this:
if ([testObj respondsToSelector: @selector(test1:)]==YES) { ... }
ok, it works, but why not simply write:
if ( [testObj respondsToSelector: @selector(test1:)] ) { ... }
Please, learn more about Boolean expressions, how to think in
Boolean expressions and how to program Boolean expressions.
Maybe it is my personal taste, but I hate all those constructs like
(...==YES) or (...==NO) or worse (...!=YES) or (often seen in this
list):
if( a<=b ) lessOrEqual=YES else lessOrEqual=NO;
it should read: lessOrEqual = a<=b;
Check your programs for ==YES or something similar.
You need not use it, but you use it, don't you ? I say it again:
it works, but for me, it ... hurts.
--
Heinrich Giesen
email: email@hidden
_______________________________________________
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