title: osx, making tableview reloadable
body: <p>I have another simple question I can not solve by myself. I have two xibs. main.xib for the user input and result.xib for the results. Xib2 starts when a button is pushed on input-xib.
  The button action (in AppDelegate.m):</p>
  
  <pre><code>- (IBAction)pushRun:(id)sender {
  
      if (!rwc)
      {
          rwc = [[ResultWindowController alloc] init];
      }
      [rwc setValueArray:[toDoItemArrayController arrangedObjects]];
      [rwc setNumberOfCalculations:[NSNumber numberWithInt:[_inputNumberOfCalculations intValue]]];
      [rwc calculateResults]; //starts method in 2nd-window controller for result calculation
  
      [rwc showWindow:self]; 
  }
  </code></pre>
  
  <p><code>rwc</code> is a <code>WindowController</code> doing the calculation and showing the result.xib (<code>ResultWindow</code>):</p>
  
  <p>ResultWindowController.h:</p>
  
  <pre><code>#import &lt;Cocoa/Cocoa.h&gt;
  
  @interface ResultWindowController : NSWindowController{
  
      NSArray *valueArray;
      NSMutableArray *resultArray;
      NSNumber *numberOfCalculations;
  }
  
  @property (nonatomic, retain, readwrite) NSArray *valueArray;
  @property (retain) NSNumber *numberOfCalculations;
  @property (nonatomic, retain, readwrite) NSMutableArray *resultArray;
  
  -(void)calculateResults;
  
  @end
  </code></pre>
  
  <p>ResultWindowController.m:</p>
  
  <pre><code>#import "ResultWindowController.h"
  #import "ResultItem.h" //my result model
  
  @implementation ResultWindowController
  @synthesize valueArray, resultArray, numberOfCalculations;
  
  - (id)init
  {
      if(![super initWithWindowNibName:@"ResultWindow"])
      return nil;
      return self;
  }
  
  -(void)awakeFromNib
  {
  
  }
  
  - (void)windowDidLoad
  {
      [super windowDidLoad];
  }
  
  - (void)calculateResults
  {
      //a lot of calculation code ...
  
      ResultItem *newResult = [[ResultItem alloc]init];
  
      [newResult setValue:[nameArray objectAtIndex:i] forKey:@"name"];
      [newResult setValue:[NSNumber numberWithDouble:avg] forKey:@"averageValue"];
      [newResult setValue:[NSNumber numberWithDouble:min] forKey:@"minValue"];
      [newResult setValue:[NSNumber numberWithDouble:max] forKey:@"maxValue"];
      [newResult setValue:dimensionRandomArray forKey:@"randomArray"];
  
      [resultArray addObject:newResult]; 
  
  }
  </code></pre>
  
  <p>The results are put in an model-object and collected in the <code>resultArray</code>.
  Now it's going to get interesting (at least for me):</p>
  
  <ol>
  <li>the <code>resultArray</code> is bound as content to a <code>NSArrayController</code> via BindingInspector</li>
  <li>the <code>NSArrayController</code> is part of the result.xib</li>
  <li>the result.xib has a <code>tableview</code> (without own class or viewcontroller)</li>
  <li>the <code>tableview</code> columns are bound to the <code>NSArrayController</code> via keyvalues used in the  <code>resultArray</code></li>
  </ol>
  
  <p>Everything works really fine when the result.xib window starts. The <code>tableview</code> shows the content as expected. BUT! When I make changes at the input.xib and push the action button again the <code>tableview</code> at the result.xib is not updating.
  I checked the <code>resultArray</code> content (via NSLog) and it gets all the new values, so works fine.</p>
  
  <p>WHERE IS MY PROBLEM?</p>
  
  <p>I read a lot of <code>[tableView reloadData]</code> but I don't know how to actuallay set up the code and the necessary bindings for it.</p>