Problems with isEqualToString
Problems with isEqualToString
- Subject: Problems with isEqualToString
- From: Ben Mackin <email@hidden>
- Date: Sat, 23 Mar 2002 11:22:54 -0800
I seem to be having a problem with both isEqual and isEqualToString.
Using the following code, it doesn't show they are equal (when I know they
should be):
if([[NSFileManager alloc] fileExistsAtPath:@"/tmp/errorCode"] == YES)
{
resultString = [[NSString alloc]
initWithContentsOfFile:@"/tmp/errorCode"];
[[NSFileManager alloc] removeFileAtPath:@"/tmp/errorCode" handler:nil];
NSLog(@"my result code");
NSLog(resultString); //Note that right here I see it is success
if([resultString isEqualToString:@"success"]==YES)
{
[statusField setStringValue:@"Fax was sent successfully!"];
[statusWin makeKeyAndOrderFront:nil];
}
else if([resultString isEqualToString:@"busy"]==YES)
{
[statusField setStringValue:@"The dialed number was busy. Try again
later."];
[statusWin makeKeyAndOrderFront:nil];
}
...
Any help would be appriciated. If you need to see the file I am reading
from, let me know.
Thanks,
Ben
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.