> > Incidentally I was mistakenly under the impression that -runModalForWindow: > was deprecated. > You were likely thinking of -[NSApplication runModalForWindow:relativeToWindow:], which has been superseded by -beginSheet:modalForWindow:…. -runModalForWindow: is used to display an application-modal window, not a sheet. -[NSAlert runModal] might be a better option in this case.
I am curious why NSRunAlertPanel is able to run on top of a modal dialog. > Can someone please point me to the code sample or document? > To run a sheet on an app-modal window, you'll need to work with the way events are being handled by the application during the modal session. The Cocoa Event-Handling Guide might be of some assistance. You should also pull up the NSAlert class reference and check out the listed companion guides, as well as possibly guides listed as companions to those guides. You'll find sample code in those guides, as well. —Jeremy On Tue, Apr 21, 2009 at 9:53 PM, Graham Cox <graham....@bigpond.com> wrote: > > On 22/04/2009, at 9:22 AM, John Yeh wrote: > > Can someone please point me to the code sample or document? >> > > > [NSApplication > beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo]; > > Does it for me... > > > Incidentally I was mistakenly under the impression that -runModalForWindow: > was deprecated. That's not the case, but nevertheless I've never used it, > I've always used the above method and it works fine even to display sheets > on other dialogs and floating panels. > > > --Graham > > > > _______________________________________________ > > 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/jeremyw.sherman%40gmail.com > > This email sent to jeremyw.sher...@gmail.com > _______________________________________________ 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