on Aug 22nd, 2016, 3:58pm, Alincon wrote:I would like to see some kind of error message, perhaps at the bottom of the screen. |
|
I don't think there's any practical (and safe) way that can be achieved, sorry. Hopefully testing would quickly lead to a realisation that the trapclose isn't working.
For your interest, the difficulty arises from the fact that an event handler can be specified in so many different ways: A 'do nothing' event: []
A branch label: [handler]
A subroutine name: handler
A word returned by INPUT: HelloWorld
I wonder how many people remember (or ever knew) that the fourth option exists:
Code: button #w, "Click Me", ButtonClicked, UL, 50, 50
open "Test" for dialog as #w
#w "trapclose QuitNow"
do
input r$
print r$
loop until r$ = "QuitNow"
close #w
end
LB 4 doesn't allow the fourth kind of event handler (a word returned by INPUT) with trapclose, but LBB treats all events alike so it does.
Richard.