title: Programmatically adding "Open Recent' menu to context popup menu
body: <p>I have a non-document Cocoa application with a menubar icon and status menu. I've added an "Open Recent" menu to the status menu in Interface Builder. Populating the menu works just fine:</p>
  
  <pre><code>[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:
              [NSURL fileURLWithPath:filename]]
  </code></pre>
  
  <p>Now I would also like to <strong>add a second</strong> "Open Recent" menu to a context popup menu. How would I create the menu programmatically so that it gets populated with entries automatically as it does for the version in the status menu?</p>
  
  <p>I tried creating a copy of the one in the status menu, but it does not get populated. I assume that NSDocumentController is not aware of the menu (frankly, I don't know how it knows about the one in the status menu).</p>