Re: how to program an interrupt button?

Tristan (tristan@creative.net)
Tue, 11 Mar 1997 13:41:45 -0800

To subscribers of the xforms list from Tristan <tristan@creative.net> :

> I would like to know how to best program an interrupt button using Xforms.
>
> Problem to be solved:
> A potentially long computation is performed by an Xforms program, and I want
> the user to be able to interrupt it by pressing on an interrupt button.
>
> [XForms fl_check_forms() and XCheckWindowEvent() solutions elided]
>
> So I should be happy, but am not because this is not XForms programming,
> but really X programming, with calls to XCheckWindowEvent and XPutBackEvent.
>
> Is there any pure XForms-way of obtaining the same result?

One way that works well is to run your xform interface in a separate
process,
and to send a signal to the process that does the computation.

The GUI process running xforms can communicate with the other process
through pipes or sockets.

This is how I have implemented the Xform front-end for the
MpegTV MPEG-1 real-time software player. The source-code of the
front-end is free and available from
ftp://ftp.mpegtv.com/pub/mpeg/mpegtv/api
for those interested.

Regards, -- Tristan Savatier (mailto:tristan@mpegtv.com)

MpegTV website: /cgi-bin/exit-to?http://www.mpegtv.com
MPEG.ORG website: http://www.mpeg.org
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/