Re: XForms: Hourglass: A tip and a question

Dr. T.C. Zhao (zhao@bragg.phys.uwm.edu)
Fri, 11 Jul 1997 00:08:33 -0500

To subscribers of the xforms list from "Dr. T.C. Zhao" <zhao@bragg.phys.uwm.edu> :

from Sindre Mehus <mehus@darmstadt.gmd.de> :
>class Hourglass {
> Hourglass() // constructor, displays hourglass
> {
> fl_set_cursor(fl_winget(), XC_watch);
> XFlush(fl_get_display());
> }

It is a nice trick, but a bit unsafe as fl_winget() may
return bogus windows. fl_winget() is guranteed to return
a valid and correct window while in the object's handler, but
outside of a handler, it may return a bad window (say when
the mouse is not on one of the forms because of
a form it was on was destroyed). In the next release, fl_winget()
will return 0 when there is no appropriate window to return and
will never return a bad window. spl's suggestion of keying the window
ID of an object/form is a sound one.
_________________________________________________
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/