osx - Alternatives to _blocksActionWhenModal Cocoa private method? -
our os x application shows modal forms @ times, , 1 of downsides of modal forms menu items don't work when have modal form visible. can click menu item normal, no selectors called on target.
this bad because if there's modal form showing, want user able command-q quit app, normal apps on on os x.
however, there undocumented method _blocksactionwhenmodal returns yes default. if override return no, menu items start working on modal forms, means can handled properly.
i'd find alternative this, i'd prefer not use undocumented method (as apple change new os release). there way of achieving same result here? "not using modal forms" isn't option.
for 10.6+, use [nswindow setpreventsapplicationterminationwhenmodal:]
on modal window allow quit.
Comments
Post a Comment