Hello.

I'm in a strange situation, where I am implementing a plugin component  
that runs within a host application which I don't have access to.

Within this context, The host sometimes calls my plug-in to open an  
NSSavePanel (or NSOpenPanel). The host expects that I'm synchronous  
--- i.e. I only return when the NSSavePanel is dismissed, and there's  
a result.

However, The host also provides me with its own Window, and I need to  
open my NSSavePanel as a Sheet-window over the host's window.

Now NSSavePanel (and NSOpenPanel) provide 2 different ways to run them

1. runModal (or a vaiant) that is synchronous --- but it does not  
create a sheet window
2 beginSheetFor... (or variants) that are asynchronous (I must supply  
with a callback selector to be called
as the NSSavePanel is dismissed) --- these DO create a sheet over the  
parent window.

Is there a decent way to combine these two requirements? Can I somehow  
call

{
.
.
.

NSSavePanel *myPanel = [NSSavePanel panel];
[myPanel setParentWindow: hostWindow];
[myPanel runModal]

// and here, call something to block until the dismissal callback is  
called?
[somehow block here]

// extract the result.
return;
}

Thanks a lot!


Motti Shneor
------------------------------------------
Senior Software Engineer
Waves Audio ltd.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to