[REBOL] Weirdness with Request boxes
From: sunandadh:aol at: 4-Feb-2002 20:59
I'd assumed that the various Request-xxx View words were modal.
But they aren't -- or at least not intuitively. Try the following for some
odd results.
unview/all
view layout [
text white "Date" [print ["date" request-date]]
text white "File" [print ["file" request-file]]
text white "Color" [print ["color" request-color]]
text white "List" [print ["list" request-list "title" ["A" "B"]]]
button "clear boxes" [Print "code to clear the boxes"]
]
Experiment 1. Click once each on Date, File and Color. Although you can get
all three boxes up, you can only action or dismiss them in the order you
invoked them. And you can only get one of each.
Experiment 2. Try clicking three times on List. You've now got three separate
list boxes on the screen (you need to move the top one to uncover the
others). None of them returns a result until all three have been clicked.
Then you get all three at once.
Other combinations give equally unsettling results.
This has some obvious downsides for a user interface. Normally, if I put up a
request box of this sort, I'd expect it to be modal. Or, given that it isn't
modal, I need some way of telling that its time has passed and clearing it
from the screen.
That leaves me with two questions I can't answer:
1. Is there any easy way to ensure the Request boxes *are* modal?
2. Is there any way I can check if any Request boxes are active and then
cancel them and the thread that was waiting on them? (i.e. code to go into
the "clear boxes" button -- and code that should go after a Request to flush
out any multiple instances)
Any ideas?
Thanks,
Sunanda.