advertisement

Article:
  Adding a Preferences Window to Your Application
Subject:   Avoid insertion of empty record
Date:   2001-12-29 19:09:15
From:   michele
In order not to insert an empty record, I've inserted the following statements at the beginning of insertRecord:


// Check if the new record is not empty
if ( ([[firstNameField stringValue] isEqualToString: @""]) &&
([[lastNameField stringValue] isEqualToString: @""]) &&
([[emailField stringValue] isEqualToString: @""]) &&
([[homePhoneField stringValue] isEqualToString: @""]) &&
([[workPhoneField stringValue] isEqualToString: @""]) &&
([[mobilPhoneField stringValue] isEqualToString: @""]) )
{
return;
}


1 to 1 of 1
  1. Avoid insertion of empty record
    2003-08-30 15:50:51  anonymous2 [View]

1 to 1 of 1