Monday, March 7, 2011

Gripe - objC: Comparing Strings in IF statements

I'm definitely not a fan of objC and here's one reason:

NSString *test;

if ([test isEqualToString:@"passed"]) {


}

Why oh why can't it just be

if (test=="passed") {


}

I just lost 1-2 hrs eliminating other non-issues in my code because of this.

Aaargh!!!

No comments:

Post a Comment

Share