Re: Comparing a CFStringRef with a string literal?
Re: Comparing a CFStringRef with a string literal?
- Subject: Re: Comparing a CFStringRef with a string literal?
- From: David Dunham <email@hidden>
- Date: Sat, 31 Jan 2009 14:08:41 -0800
On 31 Jan 2009, at 13:35, Arnaud Nicolet wrote:
CFStringRef efstr=([EFPW stringValue]);
if (efstr=="my password"){
NSLog("sjdskjf");
}
I also tried with strcmp and with a single "=". Even when both
values are the same, the equal test fails. What I am doing wrong?
Not using CFStringCompare. (CFStringRef is an opaque pointer.)
Single = is an assignment!
And if you're using Cocoa, why not use NSString* instead? Then you
could use isEqualToString:.
Finally, this question has nothing to do with Xcode, and you should
ask things like this on a Carbon or Cocoa mailing list.
David Dunham A Sharp, LLC
Voice/Fax: 206 783 7404 http://a-sharp.com
Efficiency is intelligent laziness.
_______________________________________________
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