• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with isEqualToString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Problems with isEqualToString
      • From: Ondra Cada <email@hidden>
    • Re: Problems with isEqualToString
      • From: Andy Lee <email@hidden>
    • Re: Problems with isEqualToString
      • From: Jonathan Feinberg <email@hidden>
References: 
 >CADO: Cocoa Application Developers Organization? (From: Brent Gulanowski <email@hidden>)

  • Prev by Date: Scaled images and garbage pixels
  • Next by Date: Connected to the internet or not?
  • Previous by thread: Re: CADO: Cocoa Application Developers Organization?
  • Next by thread: Re: Problems with isEqualToString
  • Index(es):
    • Date
    • Thread