Ibrahim Haddad wrote:
> I tried this:
> XtAddCallback (refresh, XmNactivateCallback, (XtPointer)refreshGraph, XtWindow(w));
> No use.
> and this:
> XtAddCallback (refresh, XmNactivateCallback, (XtPointer)refreshGraph, (Widget) w);
> But no success, although the CB is successful since the
> printf debug message is actually working.
Yes, but:
a) does `w' refer to the widget that you wish to refresh?
b) are you actually using the value that is passed to the callback function?
> So, in a desparate move (10 days before due date), I am attaching the
> draw.c file which contains the drawing function and algorithms.
Right. In refreshGraph(), you're still trying to refresh the widget to
which the callback is attached, not the one being passed as a
parameter. Try:
Window win=XtWindow((Widget) clientData);
instead. Also, from main_graphics(), `w' almost certainly isn't the
correct widget to be passing to XtAddCallback(). It looks like you
should be passing `draw', which means that you'll have to move the
XtAddCallback() to a point after where `draw' is defined.
--
Glynn Clements <[EMAIL PROTECTED]>