Here's the code:
- (IBAction) charlieInputText:(id)sender {
//getting value from text field when entered
charlieInputSelf = [sender stringValue];
if (charlieInputSelf != @"") {
//(send field if not empty
}
}
This sends it even when the field is empty; therefore, this does not work as I want it to.
Simply checks for nil and if length of text length is greater than 0 - not empty
if (textField.text && textField.text.length > 0)
{
/* not empty - do something */
}
else
{
/* what ever */
}