But on the second (and following) invocations, the window does not have focus. Is there a way to focus on the window
so the user doesn't have to click on it first?
Code: Select all
var i = 0;
function main() {
var w = new Window ("dialog");
w.text = "iteration " + i++;
var b = w.add ("button", undefined, "Button");
b.onClick = function() {
w.close();
main();
w.show();
}
w.add("button", undefined, "Cancel");
w.show();
}
main();