Re: XForms: drawing on my canvas with the mouse

AMIT BHATNAGAR (amit@cs.dal.ca)
Mon, 23 Feb 1998 14:37:49 -0400 (AST)

# To subscribers of the xforms list from AMIT BHATNAGAR <amit@cs.dal.ca> :

Steve,,,

> My favorite thing is to just use a text object. Here's a little
> generic routine I use:
>
> #include <stdarg.h>
>
> [...]
>
> void readout( FL_OBJECT *obj, char *fmt, ... )
>
> {
>
> va_list list;
> char buffer[80];
>
> va_start( list, fmt );
>
> vsprintf( buffer, fmt, list );
>
> va_end( list );
>
> fl_set_object_label( obj, buffer );
>
> }
>
> So, I'd call it with from my motion handler as:
>
> readout( some_object, "%d,%d", x, y );

Now that I have switched from .75 to .88,, I am able to use Text objects.
I am trying your function to update the current position (to be read out
from the motion handler) via your readout function. But when I try this,
gcc does :

assign3.c:579: `va_start' used in function with fixed args

and she'll fail the compile. Any ideas?

_________________________________________________
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://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/