Re: Modal only to another window?
Re: Modal only to another window?
- Subject: Re: Modal only to another window?
- From: Graham Cox <email@hidden>
- Date: Thu, 01 Mar 2012 14:15:46 +1100
On 01/03/2012, at 10:05 AM, Howard Moon wrote:
> HI,
>
> I have a an audio plug-in, run inside a host application, that provides me a window in which my plug-in's UI is drawn. What I would like to do is to make a modal window, but one that in ONLY modal in relation to my plug-in window. Is that possible? It's easy on Windows, but I don't see how to do that in Cocoa. The docs talk about an "application modal" or a "modal session", but neither of those looks appropriate. I don't want to prevent the user from accessing the host or OTHER plug-ins' windows, but I need to prevent them from accessing MY plug-in's window until they click Save or Cancel. So application modal doesn't look right. On the other hand, a modal session doesn't seem right, either, since I'm not in a loop doing any work at the time, just waiting for the user to set some plug-in preferences. And I I don't see any way to make the orderingMode permanent, such as an "alwaysOnTop" flag or something.
Use a sheet. That is Cocoa's solution for making a modal window relative to another window. Don't try to force a non-sheet window always on top or anything like that, your users will think your app/plugin sucks or is broken.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden