title: Cocoa setFrameSize in didFinishLoadForFrame
body: <p>I'm having an issue adjusting the size of a View.</p>
  
  <p>If mainView is an instance variable of an NSView Object and I place the following command:</p>
  
  <pre><code>[self.mainView setFrameSize:NSMakeSize(1000, 1000)];
  </code></pre>
  
  <p>Within one of my instance functions and call it, the frame resizes fine. However, if I place it here:</p>
  
  <pre><code>//called when the frame finishes loading
  - (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)webFrame
  {
  
      [self.mainView setFrameSize:NSMakeSize(1000, 1000)];
  
  }
  </code></pre>
  
  <p>It throws the following error:</p>
  
  <pre><code>2012-08-31 18:01:30.410 myApp[37822:303] -[__NSCFType mainView]: unrecognized selector sent to instance 0x10014bac0
  2012-08-31 18:01:30.410 myApp[37822:303] *** WebKit discarded an uncaught exception in the webView:didFinishLoadForFrame: delegate: &lt;NSInvalidArgumentException&gt; -[__NSCFType mainView]: unrecognized selector sent to instance 0x10014bac0
  </code></pre>
  
  <p>I should add that the didFinishLoadForFrame does definitely run when the WebView fully loads, I can NSLog a Hello World from it just fine. Just not resize the view.</p>
  
  <p>Does anybody know what's going on? I'm pretty new to this.</p>
  
  <p>EDIT mainView is declared thusly:</p>
  
  <pre><code>@interface ContentViewController : NSViewController {
      IBOutlet NSView *mainView;
  }
  @property IBOutlet NSView *mainView;
  </code></pre>
  
  <p>Synthesised and linked in the .xib</p>