On Sat, Sep 5, 2015 at 3:45 PM, Pascal J. Bourguignon
<[email protected]> wrote:
> AFAIK, it's on purpose.  Definitely in the case of an application modal
> dialog.
> In the case of a window modal dialog, you can switch to another window, and
> then have access to the menubar, but within the context of the window modal
> dialog, you the menus are disabled.

I know, but I thought there might be some workaround...

In my case it is an application modal dialog.

And I cannot change this because its not really an application that I
am writing, it is a cross-platform framework, and some people use the
framework to write apps which have application modal dialogs that have
menus...

My only idea so far is to just show the window normally, not using
runModalForWindow, and then manually in each event handler for other
windows check if there is a modal window and if there is, drop the
event. But its a lot of work to change *all* event handlers, while I
am satisfied with runModalForWindow so far, only the menus don't work.

> Where did you put the validateMenuItem? The object implementing
> validateMenuItem must be the target of the |/menuItem. /|

I put it in the menu item (descendent from NSMenuItem), which is its
own target (I call item.setTarget(item) ). And I'm sure the target is
correct, because otherwise menu items wouldnt respond to click
(action) otherwise.

thanks,
-- 
Felipe Monteiro de Carvalho
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to