title: Set an NSButton's action to be the same as an NSMenuItem's
body: <p>In my application, I save user preferences and one of the preferences is whether to show any <code>NSMenuItem</code>s as buttons in the home window. I don't have problems to create the buttons dynamically, but I can't pass the action of the <code>NSMenuItem</code> to the <code>NSButton</code>. I have already tried:</p>
  
  <pre><code>[newButton setAction:[theItem action]];
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>I just have to set the target as self</p>
  
  <pre><code>[newButton setTargert:self];
  </code></pre>
  
  <p>And move the code to the class that send the action to the <code>NSMenuItem</code> </p>