title: How to check if an NSWindow is open
body: <p>I have an <code>NSWindow</code> which can be closed and reopened (I've called <code>[setReleasedWhenClosed: NO]</code>). How do I check if it is open or closed programmatically?</p>
  
  <p>I've read the doc and Googled but can't see a sane way to do this. <code>[isVisible]</code> is deprecated. <code>[occlusionState]</code> isn't what I'm after. I've worked around it using notifications, but I can't believe there isn't some property or method on <code>NSWindow</code> to do this</p>