[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Interrupting a widget application


I have written a widget application which, once the START button is
pressed, does lots of huge, time consuming calculations. 

My first solution was to create another widget, containing an ABORT
button. I used WIDGET_EVENT to check whether the button was presed, and
this worked okay. I just would prefer not to have a second window only
for this purpose.

So I added the button directly to the main widget. Surprisingly, this
works. I use WIDGET_EVENT( abort_button, /nowait, /save_hourglass),
which does not return an event for the button, but it triggers the
XMANAGER somehow to enter the event routine for the button. There I set
a global variable to indicate that the button was pressed, so I can exit
the calculation routine.

But there is a problem: WIDGET_CONTROL,/hourglass does not work any
more, and I don't understand why this is the case.

That is why I wrote this posting. After writing this, I just realized
that another call of WIDGET_EVENT for any widget sets the cursor back to
the normal state. Hm. No problem any more. But I typed this stuff
anyway, and maybe this could be interesting to someone, so why not just
hit the SEND button right n