title: Set value of NSTextField
body: <p>I am trying to set the value of an <code>NSTextField</code>, but it's not working properly.</p>
  
  <p>I have a button linked to an <code>IBAction</code>, and when I set it using <code>self</code>, it works fine:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  
  @interface TestMessage : NSObject {
       IBOutlet NSTextField *text;
  }
  
  - (IBAction) setMessage: (id) controller;
  - (void) Message:(NSString *) myMessage;    
  @end
  </code></pre>
  
  <hr>
  
  <pre><code>#import "TestMessage.h"
  
  @implementation TestMessage
  
  - (IBAction) setMessage: (id) controller {
      // This works
      [self Message:@"Hello"];
  
      // but this doesn't
      TestMessage * messageTest= [TestMessage new];
      [messageTest Message:@"Hi"];
  
  }
  - (void) Message: (NSString *) myMessage {
      [text setStringValue: myMessage]; 
      NSLog(@"Message Was Called");
      // This returns &lt;NSTextField: 0x1001355b0&gt; when called 
      // using self, but null when called the other way.
      NSLog(@"%@", text);
  }
  
  @end
  </code></pre>
  
  <p>I've searched for a while, but still can't find the answer.</p>
  
  <p>I guess it has something to do with the delegate, but I'm not sure.</p>
  
  <p>Thanks in advance.</p>