• 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
Re: A bit stumped....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A bit stumped....


  • Subject: Re: A bit stumped....
  • From: Jim Correia <email@hidden>
  • Date: Fri, 20 Jul 2001 12:56:18 -0400

At 9:54 AM -0500 7/20/01, Andre Benassi wrote:

Cocoa NSStrings do not work like standard C Strings. You cannot compare
them using ==. Instead you need to send them as a message:

You can't do that with c strings either!

const char *one = "some text"
const char *two = "some text"

if (one == two)
NSLog(@"pointers are equal");
else
NSLog(@"pointers are not equal");

if (0 == strcmp(one, two))
NSLog(@"strings are equal");
else
NSLog(@"strings are not equal");


References: 
 >Re: A bit stumped.... (From: "Andre Benassi" <email@hidden>)

  • Prev by Date: Re: Disabling some compiler warnings
  • Next by Date: Re: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java)
  • Previous by thread: Re: A bit stumped....
  • Next by thread: Re: Resize corner on NSPanel
  • Index(es):
    • Date
    • Thread