Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hi,
I am having trouble making a XUI dialog modal.
<window modal="true" ...
Isn't enough. In fact, when I set that, the dialog doesn't display at all. Do I need to do something specific on subsequent window_create() or window_show()?
I've scoured the code that ships with Editor and found that PTC uses _xmldlg::displayDialog(). I've required _xmldlg and mimicked the calls, but I'm still not getting it to work.
Anyone seen/solved this before?
Solved! Go to Solution.
Hi Paul--
You might need to use event_process() and event_stop_process() to hijack event processing until the user is done with the dialog. Just make sure you catch all the exit points for the dialog to call event_stop_process()--if the users find a way to kill the dialog without calling that, it will leave editor in a wonky state, and may result in zombie processes when the user exits the application.
--Clay
Hi Paul--
You might need to use event_process() and event_stop_process() to hijack event processing until the user is done with the dialog. Just make sure you catch all the exit points for the dialog to call event_stop_process()--if the users find a way to kill the dialog without calling that, it will leave editor in a wonky state, and may result in zombie processes when the user exits the application.
--Clay
Thanks, Clay! That did indeed work.
I set <window modal="true"...
I called window_show(myxuiwin, 1);
I called event_process(0);
And then, as you suggested, on every button, ESC, or , the first thing I do is call:
event_stop_process(0)
The 0 is significant. If you provide a non-zero value, all input is suspended and the dialog itself is not accessible to the user until the ESC and then the dialog is available but not modal. Also, if you do the window_show() and event_process() timing wrong, very strange things happen.