title: Is this the right way to add items to NSCombobox in Cocoa?
body: <p>I'm Delphi programmer and very new to Cocoa.
  at first I tried this :</p>
  
  <pre><code>-(void)awakeFromNib
  {
      int i;
      NSString *mystr;
      for (i=1;i&lt;=24;i++)
      {
        [comboHour addItemWithObjectValue:i];
      }
  }
  </code></pre>
  
  <p>But it didn't work. Then I tried to search on Google but no luck.
  After experimenting about 30 min, I come with this:</p>
  
  <pre><code>-(void)awakeFromNib
  {
      int i;
      NSString *mystr;
      for (i=1;i&lt;=24;i++)
      {
          mystr = [[NSString alloc]initWithFormat:@"%d",i];
          [comboHour addItemWithObjectValue:mystr];
          //[mystr dealloc];
      }
  }
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Is this the right way to do that ?</li>
  <li>Do I always need to alloc new
  NSString to change its value from
  integer ?</li>
  <li>When I uncomment [mystr dealloc],
  why it won't run ?</li>
  <li>Does it cause memory leak to alloc
  without dealloc ?</li>
  <li>Where can I find basic tutorial like
  this on internet ?</li>
  </ol>
  
  <p>Thanks in advance</p>