advertisement

Article:
  Adding a Preferences Window to Your Application
Subject:   Clear Fields
Date:   2001-12-29 19:07:04
From:   michele
I've added the following function, so that the fields are cleared after adding and inserting a new entry:


- (void) clearField
{
[firstNameField setStringValue:@""];
[lastNameField setStringValue:@""];
[emailField setStringValue:@""];
[homePhoneField setStringValue:@""];
[workPhoneField setStringValue:@""];
[mobilPhoneField setStringValue:@""];
}


The function is called at the very end of addRecord and insertRecord. Thus, there is no empty entry added.