Did you know that, when using Objective C over Cocoa, there is no trim method! I’m fooling with some really simple code that should take all of 2 minutes tops but because ObjC/Coca breaks things out completely different than Java I’m facing collisions left and right. Luckily I think I’m smart enough to figure out why:
NSString @someString = @”Start”;
@”Start” == someString;
is not a true statement. I’m relying on my Java background which states that == referrs to object identity not equality is you might hope/guess/pray. Now I’m pawing through the String Programming Guide that sends me off on a tangent. I’m looking at the compare method which returns an NSComparisonResultwhich is typdef’ed to some crazy enum with ordering values. I don’t use enums, not even in Java so now I gotta read up on that too? Where is .equals()? Oh wait… I just looked at the string docs again and there is an isEqualTo method… *phew*
It’s going to take some getting used to. I found the quick API lookup in XCode which is mandatory for writing anything more sophisticated than HelloWorld. There’s a lot of other niceties in XCode as well but, BUT I stand by my original word that XCode has nothing on IntelliJ Idea. There’s an idea! Why doesn’t Jetbrains create an iPhone IDE? That would be off the chains!