escape key?
What is the string or whatever for the escape key in Cocoa?
Thanks,
Iceman
Thanks,
Iceman
Ok I just got it working by using:
if ([keyChars characterAtIndex:index] == 27) { }
why wouldn't the code I used before work?:
if ([keyChars isEqualToString:@"27"]) {}
Thanks,
Iceman
if ([keyChars characterAtIndex:index] == 27) { }
why wouldn't the code I used before work?:
if ([keyChars isEqualToString:@"27"]) {}
Thanks,
Iceman
Because "27" is a string containing the 2 character, the 7 character and a null character. 27 (without the quotes) is the number 27. So, in the incorreect version, you are testing whether the user had pressed 2 and 7 at about the same time (with the 2 first)
Hoope this helps
Hoope this helps
Ahh so thats the difference. Thanks.
Thanks again,
Icy
Thanks again,
Icy

