Determine when a NSOpenPanel will close

Posted by Martin on Stack Overflow See other posts from Stack Overflow or by Martin
Published on 2010-03-17T19:05:34Z Indexed on 2010/03/17 19:51 UTC
Read the original article Hit count: 241

Filed under:
|

I'm trying to determine when an NSOpenPanel is closing before it actually closes. I need to do this so I can overlay another window with a screenshot of the open panel on top of it to be animated. Unfortunately, all the notifications that you seem to be able to access seem to fire AFTER the window's already been closed. This leads to a jarring stutter before you start your transition.

I've tried:
- using NSWindow delegate methods on the open panel (apparently, none of the NSWindow delegate methods work)
- monitoring panel:userEnteredFilename:confirmed: (not called)
- showing the dialog with a callback (callback happens AFTER the panel disappears)

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about nsopenpanel