• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Selector not working for me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: Redrawing a superview from another view's -drawRect: method
  • Next by Date: Re: Redrawing a superview from another view's -drawRect: method
  • Previous by thread: Re: Selector not working for me
  • Next by thread: Re: Accessing DOM in 10.3.9
  • Index(es):
    • Date
    • Thread