Re: XForms: Drawing an object, within a callback

Stephen Langer (langer@cam.nist.gov)
Wed, 5 Nov 1997 09:15:15 -0500

To subscribers of the xforms list from "Stephen Langer" <langer@cam.nist.gov> :

>
> [ plain text
> Encoded with "quoted-printable" ] :
To subscribers of the xforms list from "Orn E. Hansen"
<oe.hansen@oehansen.pp.se> :
>
> >
> I was thinking in the lines of a function, that would realize the
> object. I have a text_object, that I use to display messages and shows
> the progress of program while it is within a loop... thus not giving
> control to XForms. I had tried calling 'fl_draw_object_label', but
> the label only was visual after control was return to XForms.

Perhaps you just need to call XFlush(fl_get_display()) after doing your
drawing. If you are doing lots of other computation before returning control
to XForms, the X server may be behind on processing your requests. I think I
had the same problem you described -- using a browser to display the progress
of a calculation, and not seeing the new text until the calculation was done.
Calling XFlush() after writing each new line to the browser solved the
problem.

-- Steve

-- 
-- EMail: stephen.langer@nist.gov                    Phone: (301) 975-5423 --
-- WWW:  http://math.nist.gov/mcsd/Staff/SLanger/    Fax:   (301) 990-4127 --
-- Mail: Building 820 Room 365; NIST; Gaithersburg, Md          20899-0001 --
_________________________________________________
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/