Re: isNotEqualToString

  • Ahem,

    if you invert part, you’ll invert all...

    || should become &&

    atze

    Am 13.02.2009 um 10:00 schrieb Chunk 1978:

    > i'm trying to minimize my if statement.  i have the following which
    > works:
    >
    > -=-=-=-
    > if (([currentDesktopBackgroundImage isEqualToString:firstPath]) ||
    > ([currentDesktopBackgroundImage isEqualToString:secondPath]))
    > {
    > //Go North
    > }
    > else
    > {
    > //Go South
    > }
    > -=-=-=-
    >
    > i'd like to remove the else part but the following doesn't work:
    >
    > -=-=-=-
    > if ((![currentDesktopBackgroundImage isEqualToString:firstPath]) ||
    > (![currentDesktopBackgroundImage isEqualToString:secondPath]))
    > {
    > //Go South
    > }
    > -=-=-=-
    >
    > wtf?

    ---
    Alexander Spohr
    Freeport & Soliversum

    Fax: +49 40 303 757 99
    Web: http://www.freeport.de/
    Box: http://dropbox.letsfile.com/02145299-4347-4671-aab9-1d3004eac51d
    ---
previous month february 2009 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28  
Go to today