title: How to save text fields values in core data in Mac (osx) application?
body: <p>I have created trivial application for osx which use core data(it is NOT document based application)</p>
  
  <p>I have created an entity named myTable and I have 3 attributes inside (myString1,myString2 and myString3) which are all strings.</p>
  
  <p>I have created 3 text fields and a save button in the .xib file. In the AppDelegate.h, i have created 3 IBOutlets for the text fields, and 1 IBAction for the save button.</p>
  
  <p>In the AppDelegate.m, i have the following code so far:
  (The default code has been omitted here for the sake of simplicity.)</p>
  
  <pre><code>- (IBAction)saveButtonHasBeenClicked:(id)sender {
  //fill the array
  
  NSArray * myArray = [[NSArray alloc]initWithObjects:[_firstTextField stringValue],[_secondTextField stringValue], [_thirdTextField stringValue], nil];
  
  // how to save this array in coredata?
  
  
  }
  </code></pre>
  
  <p>If I run the following code:</p>
  
  <pre><code>for (NSString *detail in myArray) {
      NSLog(@"Detail is: %@",detail);
  }
  </code></pre>
  
  <p>I can verify that array has been populated with the values of the text fields. However, I am not sure should i save the values in array, and then insert them in coredata, or I should insert each text field value separately.</p>
  
  <p>I know that I should do some key:value: coding here, but I have no idea where to start. Anyone can help me with this code, or post a link to some tutorial? I know how to save data with NSTableView and binding, but I can't find my way with text fields and coding.</p>