title: Programmatically retrieving the selected object of an NSArrayController
body: <p>When I use an <code>NSArrayController</code> with instances of <code>NSManagedObject</code>, I was under the impression that the following would give me its selected object:</p>
  
  <pre><code>[myArrayController selection]
  </code></pre>
  
  <p>However, this gives me an instance of some private NS Proxy class.</p>
  
  <p>When I use:</p>
  
  <pre><code>[[myArrayController selectedObjects] objectAt: 0]
  </code></pre>
  
  <p>...all is fine and I have my instance of <code>NSManagedObject</code>.</p>
  
  <p>I understand the necessity for these methods as you can probably have lists which allow for multiple selection. I do not understand why <code>selection</code> does not give me the instance of <code>NSManagedObject</code>.</p>