Hi - I want to create a modal window that requests a response from the user, something like this:
teb = text edit box("");
ok = button box("OK");
nw = new window("My Modal Window", << modal(1),
h list box(text box("Type here: "), teb),
ok
);
How can I prevent the window from closing if the user clicks on “OK” without supplying a response? I’ve tried adding assorted scripts to the “OK” button to see if teb contains a string of greater than zero length, and then only closing the window if it has, but I can’t seem to find the right syntax: the window always closes regardless.
I note that the window supplies an "OK" button even if I don't include it (presumably because it has to have one), so I'm wondering whether it is replacing my "OK" button with one of its own. Is it possible that that's the problem?
Many thanks