title: NSView inside an NSPopover: Converting Coordinates
body: <h3>Context</h3>
  <p>Let <code>P</code> be an NSPopover and <code>view</code> be an NSView that is a subview contained within <code>P</code>.</p>
  <h3>What I Need</h3>
  <p>I want to take the frame of <code>view</code> and convert it to the <em>screen's</em> coordinate system. Normally, you would do that like this:</p>
  <pre><code>NSRect frameRelativeToWindow = [self convertRect:self.frame relativeToView:nil]; 
  [self.window convertRectToScreen:frameRelativeToWindow];
  </code></pre>
  <p>However, because <code>view</code> is in an NSPopover, its <code>window</code> property is nil and the above method will return NSZeroRect: [0, 0, 0, 0]</p>
  <p>So, how can I get my view's frame in screen coordinates if the view is in an NSPopover?</p>
  <h2>Notes:</h2>
  <ol>
  <li>The NSPopover IS onscreen and visible.</li>
  <li>The view whose frame I am trying to convert to screen coordinates is not a direct subview of the NSPopover or its contentView. The view in question is actually a custom NSView within an NSTableCellView within an NSTableView within an NSScrollView within an NSClipView. The clipView is a direct subview of the NSPopover's contentView.</li>
  <li>In a normal NSWindow, you can take any subview and call <code>[self window]</code> to get the containing NSWindow object. Doing that in a popover, however, returns nil.</li>
  </ol>