On Sun, Sep 6, 2015 at 10:20 AM, Felipe Monteiro de Carvalho <[email protected]> wrote: > On Sat, Sep 5, 2015 at 8:49 PM, Stephane Sudre <[email protected]> wrote: >> Which feature of a modal window are you looking for? > > Disabling all other windows in the app and staying on top of them. > >> Because having >> all the menu items being enabled in the case of a modal dialog does >> not match the nature of the modal mode (i.e. restricted mode). > > In Mac OS X maybe, but in Linux and Windows there is no problem in a > modal window having a menu, so its not like its a conceptual problem. > >>> Each menu item has itself as target and a method to respond to the action. >> Why not have at least a shared object as the target? > > Why does this make any difference? The target supposedly is just a > method of an object, I don't see why Cocoa cannot call it. The object > must remain in memory. And if the object is in memory the method can > be called.
IMHO, it would just be cleaner both from a code and architecture (MVC) point of view. Because the final target of your action is not the menu item. > > So you are saying that it would work if the target is not the menu item > itself? Usually, the FirstResponder object would be the target of the menu item action so that if you implement the action in your window/dialog controller or in another potential first responder in the dialog, the menu item will be enabled (even without a validateMenuItem: implementation). _______________________________________________ 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]
