Re: XForms: Free object draw and redraw problem

Lam Chin Hun Ricky (
Mon, 4 May 1998 19:01:14 +0800 (HKT)

# To subscribers of the xforms list from Lam Chin Hun Ricky <> :

> The answer to this question, of course, depends upon your system and
> the connection to your server but if your Free object handler is
> completing its work and returning within that period of time then you
> should be getting updates.
> Are you by any chance modifying any other objects from within your
> Free object handler? This can confuse XForms. If you need to update
> other objects, this should be done from a callback, not an object
> handler. I don't see this as the source of this problem but it's
> worth a look.
> Just as an experiment, you might try calling
> XFlush( fl_get_display() );
> at the end of your drawing, just to see if that makes a difference.
> (It really shouldn't if you're calling fl_check_forms() after calling
> fl_redraw_object() but who knows.)
> Do I understand correctly that the initial graphics in your Free
> object are drawn and then nothing else ever gets updated, no matter
> how long you wait? Or are things being updated but not at the pace at
> which you'd expect?
> Without seeing the handler code that's probably about all I can suggest.
> spl


Here is part of the program :

int freeobj1_handle(FL_OBJECT *ob, int ev, FL_Coord mx, FL_Coord my,
int key, void *xev)
int i;
float d, alpha, x, y, x1, x2, y1, y2;
for (i=0;i<25;i++)
XFlush( fl_get_display() );
return 0;

The function is to draw a filled circle, a line circle and three lines within the area of the free object (location is 395,30,280,280). All the lines will change their lengths according to the data defined by the following routine.

void length()
(get the new data);

This routine is called when there are new data arrived. It gets the new data and call fl_redraw_object() and the rate is really fast (more than 3 times per sec). fr is the pointer pointing to the free object.

Other objects like buttons and sliders just handed and not response when running. The free object is updated but overlap with the old one. Can somebody tell me why?

Thanks in advance!


To unsubscribe, send the message "unsubscribe" to or see
XForms Home Page:
List Archive: