Re: Problems with NSApp runModalForWindow
Re: Problems with NSApp runModalForWindow
- Subject: Re: Problems with NSApp runModalForWindow
- From: Vijay Malhan <email@hidden>
- Date: Tue, 27 Sep 2011 00:51:25 +0530
2011/9/25 Vojtěch Meluzín <email@hidden>
> Hi,
>
> I'm creating a GUI system for AU/VST plugins. The host creates the view and
> the rest is based of modal windows, so I'm using NSApp runModalForWindow
> for
> that. But there are a few problems:
>
> 1) NSApp runModalForWindow does not activate the window. Right now I'm
> testing it as an application not plugin, but otherwise it is same. When
> runModalForWindow is called, it works, but the window is initially hidden
> and XCode's debugger is over it. Then I can use F3 and click the window to
> show it.
>
You can try calling [window makeKeyAndOrderFront:] before doing
runModalForWindow for the same window.
> 2) Similarly when I use runModalForWindow for the second time, hence one
> modal window above another one, it is initially hidden.
>
>
> 3) When I use runModalForWindow inside another modal loop, it often crashes
> with some weird exception from the release pool. Btw. it seems more often
> when I use abortModal then stopModal, but since I'd rather use abortModal
> as
> I'm not sure the window will be closed from the main thread.
>
Can you provide the stack trace of the exceptions you are facing.
>
> Thanks you,
> Vojtech
> <http://www.meldaproduction.com>
> _______________________________________________
>
> 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
>
_______________________________________________
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