5 Replies Latest reply: Oct 2, 2008 1:17 PM by omarh93
vavdiyaharesh Level 1 Level 1 (25 points)

suppose i have two control one is textField and second is button for submitting to value of textField.

I can click on button then and then only i have entered values.

If i press button without put cursor on textField then it should give
me alert when textField has not any value.

I have tried like,

NSString *string = textField.text;
if(string isEqualToString:@"")
code of alert;
NSLog(@"textField is empty");

But its not working for me.

if([string lenght]>0)
processing code
code for alert and ;;;;;

Its also not working for me.

Please anyone tell me where am i wrong????????????


Message was edited by: vavdiyaharesh

mac book, Mac OS X (10.5.4)