XForms: Newbie Question

Marisa Giancarla (marisa@andromedia.com)
Wed, 21 May 1997 13:59:57 -0700

To subscribers of the xforms list from Marisa Giancarla <marisa@andromedia.com> :

>>>>> "PS" == Philippe Steindl <psteindl@webshuttle.ch> writes:

PS> this is a newbie question: Since fl_do_forms takes over
PS> control, how do I create an application, that also itself
PS> needs to constalty watch something? I had in mind a MIDI
PS> watcher, that watches /dev/midi if there's bytes coming and
PS> displays that by flashing a 'light' (A box) on an xforms
PS> form. So I need to constantly watch the midi file descriptor
PS> and at the same time have the xform running .... How do I do
PS> that?
I would say that the standard way is to use a timer object and
a callback. But for something like MIDI you may need to bypass using
fl_do_forms() and write your own control loop which calls (I believe)
fl_check_forms(). I'm sure someone else will correct me if I am
wrong. :-)
The other way would be to have a sub-process that was doing
the MIDI reads & writes, and taked to the GUI layer via a
socket. There are calls to have the standard Xforms event loop also
monitor external sockets and to call a callback if there is
data. Because MIDI is timing critical the choice of what is best for
your ap may not be easy.

To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/