title: Detecting focus/unfocus of active NSDocument
body: <p>Is there anyway to detect the focus/unfocus of an NSDocument? I would like to dynamically update a menu item that pertains to the active document but I can't see any immediately obvious way of doing it.</p>
  
  <p>The reason being, I'd like to activate and then populate the menu on document focus, and then unpopulate and deactivate on loss of focus.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks,</p>