title: Adding items to a combo box's internal list programmatically
body: <p>Despite Matt's generous explanation in my last question, I still didn't understand and decided to start a new project and use an internal list.  </p>
  
  <pre><code>- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
      codesList = [[NSString alloc] initWithContentsOfFile: @".../.../codelist.txt"];
      namesList = [[NSString alloc] initWithContentsOfFile: @".../.../namelist.txt"];
      codesListArray = [[NSMutableArray alloc]initWithArray:[codesList componentsSeparatedByString:@"\n"]];
      namesListArray = [[NSMutableArray alloc]initWithArray:[namesList componentsSeparatedByString:@"\n"]];
      addTheDash = [[NSString alloc]initWithString:@" - "];
      flossNames = [[NSMutableArray alloc]init];
  
       [flossNames removeAllObjects];
  
      for (int n=0; n&lt;=[codesListArray count]; n++){
          NSMutableString *nameBuilder = [[NSMutableString alloc]initWithFormat:@"%@", [codesListArray objectAtIndex:n]];
          [nameBuilder appendString:addTheDash];
          [nameBuilder appendString:[namesListArray objectAtIndex:n]];
          [comboBoz addItemWithObjectValue:[NSMutableString stringWithString:nameBuilder]];
          [nameBuilder release];
      }
  }
  </code></pre>
  
  <p>So this is my latest attempt at this and the list still isn't showing in my combo box.  I've tried using the <code>addItemsWithObjectValues</code> outside the for loop along with the suggestions at this question:
  <a href="https://stackoverflow.com/questions/1973179/is-this-the-right-way-to-add-items-to-nscombobox-in-cocoa">Is this the right way to add items to NSCombobox in Cocoa?</a></p>
  
  <p>But still no luck.  If you can't tell, I'm trying to combine two strings from the files with a hyphen in between them and then put that new string into the combo box.  There are over 400 codes and matching names in the two files, so manually putting them in would be a huge chore, not to mention, I don't see what would be causing this problem.  The compiler shows no warnings or errors, and in the IB, I have it set to use the internal list, but when I run it, the list is not populated unless I do it manually. </p>
  
  <p>Some things I thought might be causing it:</p>
  
  <ul>
  <li>Being in the
  <code>applicationDidFinishLaunching:</code> method</li>
  <li>Having the string and array variables
  declared as instance variables in the
  header (along with @property and
  @synth done to them)</li>
  <li>Messing around with using
  appendString multiple times with
  NSMutableArrays</li>
  </ul>
  
  <p>Nothing seems to be causing this to me, but maybe someone else will know something I don't.</p>