MATLAB App Designer uialert vs uiconfirm: Stacking Order and Focus Management
0 reputation · 25 Sept 2020, 08:31 UTC
Goal: Manage User Notifications in App Designer
In an App Designer application that streams data, the goal is to display critical warnings and decision prompts without interrupting the user’s workflow or causing alert fatigue.
Constraints
Both uialert and uiconfirm are modal and block interaction until dismissed. When multiple asynchronous callbacks (e.g., timers or listeners) trigger these dialogs, the order in which they appear and which dialog retains focus is not clearly documented.
Unresolved behavior: when two modal dialogs are requested nearly simultaneously, MATLAB may stack them or allow the second to overwrite the first. This can lead to lost focus and confusing user experience.
Questions
- Which dialog receives focus when two
uialertoruiconfirmcalls are made from concurrent callbacks? - Does MATLAB queue the dialogs or display them in the order of invocation?
- What pattern should developers use to guarantee a predictable stacking order and prevent focus loss?