Alternate proposal to #12344
Is your feature request related to a problem? Please describe.
I was trying to implement some code for a proposal of a UX bug fix.
It would have been convenient to use a dialog containing "Cancel" and "Continue" buttons.
If I was to do that in an add-on, it would be straight forward:
- Call
wx.messageDialog, with the wx.OK | wx.CANCEL flags, in a context handler.
- Then call
.SetOKLabel("&Continue") on the context handler instance.
However, because of a freeze issue which occurs when a dialog and an NVDA settings dialog are open at the same time, gui.messageBox was created to run a locking scheme to prevent more than one dialog, and its docstring says not to use wx.MessageDialog.
Describe the solution you'd like
In #12344, I suggested modifying gui.messageBox to use wx.MessageDialog. I made a test build doing this, and changed a dialog by restyling its buttons.
Everything worked fine, and I could not cause any failures from it.
However if there is concern about making a change wholesale like that, I will suggest as an alternative:
Creating a gui.messageDialog function.
It can call wx.MessageDialog, but wrapped in the same protections that gui.messageBox uses.
It can then offer the styling, extended messages, and so on, that wx.MessageDialog offers, but only be used when developers find its use appropriate to the situation.
All calls to gui.messageBox can then continue unaffected.
Describe alternatives you've considered
See #12344
Additional context
Alternate proposal to #12344
Is your feature request related to a problem? Please describe.
I was trying to implement some code for a proposal of a UX bug fix.
It would have been convenient to use a dialog containing "Cancel" and "Continue" buttons.
If I was to do that in an add-on, it would be straight forward:
wx.messageDialog, with thewx.OK | wx.CANCELflags, in a context handler..SetOKLabel("&Continue")on the context handler instance.However, because of a freeze issue which occurs when a dialog and an NVDA settings dialog are open at the same time, gui.messageBox was created to run a locking scheme to prevent more than one dialog, and its docstring says not to use wx.MessageDialog.
Describe the solution you'd like
In #12344, I suggested modifying gui.messageBox to use wx.MessageDialog. I made a test build doing this, and changed a dialog by restyling its buttons.
Everything worked fine, and I could not cause any failures from it.
However if there is concern about making a change wholesale like that, I will suggest as an alternative:
Creating a gui.messageDialog function.
It can call wx.MessageDialog, but wrapped in the same protections that gui.messageBox uses.
It can then offer the styling, extended messages, and so on, that wx.MessageDialog offers, but only be used when developers find its use appropriate to the situation.
All calls to gui.messageBox can then continue unaffected.
Describe alternatives you've considered
See #12344
Additional context