I am writing a Cocoa Program. I have reached a problem when I am trying to compare a user generated string to a constant. Right now I am trying to compare them by using
Where abc is an editable text field.
This doesn't work when I type xyz into abc and activate it. I know it is connected correctly as other functions are working. I believe it has to do with the null terminator or something, but I don't know how to fix the problem.
Can someone help me with this?
Code:
if([abc stringValue] == @"xyz")
{
...
}
This doesn't work when I type xyz into abc and activate it. I know it is connected correctly as other functions are working. I believe it has to do with the null terminator or something, but I don't know how to fix the problem.
Can someone help me with this?