title: Use a text field to set the value of a variable
body: <p>I have a few NSTextFields in my XIB. I created the action for one of my text fields, and it looks like </p>
  
  <pre><code>- (IBAction)setXPos:(id)sender;
  </code></pre>
  
  <p>In my AppDelegate.h file, I also created an <code>int</code> named <code>XPos</code>. In my AppDelegate.m file, I am having trouble setting the value of XPos to be what I type into the text field. Any help here? Do I need to do a </p>
  
  <pre><code>@property
  </code></pre>
  
  <p>in my AppDelegate.h? My current code looks like this:</p>
  
  <pre><code>XPos = sender;
  </code></pre>
  
  <p>But it errors.</p>