Comparison WTF's
Comparison WTF's
- Subject: Comparison WTF's
- From: "Waldo Lee Sharvey" <email@hidden>
- Date: Mon, 27 Oct 2008 13:12:36 -0400
I'm currently using XCode 3.1 on my OS X 10.5.4 macbook. In one of my
projects, I was having trouble comparing what should have been two
identical strings. After accounting for any encoding issues, hidden
newlines, uppercase 0's looking like 0's, etc, I spliced into my code
the simplest test case and ran it through the debugger.
NSString *stringOne = @"0";
NSString *stringTwo = @"0";
BOOL stringsEqual = [stringOne isEqualToString: stringTwo];
The value for stringsEqual repeatedly returned NO.
I then created a new foundation tool project that only contained that
exact same code, and ran it through the debugger. stringsEqual
repeatedly returned as YES.
I also tried some integer comparisons (int firstInt = 1; int secondInt
= 1; intsEqual = firstInt == secondInt); In my original project, the
tests returned NO. In my quick test project, the tests returned YES.
Has anyone experienced this kind of weirdness/corruption before? I
know that XCode files can occasionally get corrupt, I've never seen
corruption go this deep. I could probably solve the problem by simply
creating a new project and re-importing all my files, but that's a bit
of work I'd like to avoid, plus I want to figure out the solution so I
know what to do when/if it happens again.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden