XForms: how to turn off Xforms messages ?

Tristan Savatier (tristan@mpegtv.com)
Sat, 16 Aug 1997 21:12:15 -0700

To subscribers of the xforms list from Tristan Savatier <tristan@mpegtv.com> :

Long long time ago, Steve Lamont wrote:
>
> To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
>
> > > > "Failed to share colors. Using private colormap"
> > > >
> > > > Is there a way to turn off this type of messages ?
>
> This is a hack but it should work:
>
> #include <stdarg.h>
>
> [...]
>
> void my_own_error_handler(const char *func, const char *fmt,...)
>
> {
> /* Put anything you wish here. */
> }
>
> void (*whereError(int something,
> int level,
> const char *string,
> int some_int))(const char *func, const char *fmt,...)
> {
> return my_own_error_handler;
> }
>
> Unfortunately, this shuts everything off. You can be more clever
> about processing the error level and return different handlers for
> different errors if you wish.
>
> my_own_error_handler can be any name you want, whereError shadows an
> internal library routine.

I tried it and it works. But I want to be able to select whether
I want to see the Xforms messages or not, at run time.

What is the name of the xforms internal routine
that whereError() should return if I want the "default"
Xforms error handler to be used ? I tried NULL, but
it does not work.

By the way, the manual mentions a routine called
fl_show_error(). I tried fl_show_error(0), but
it does not seem to prevent messages like:

In MapColor [flcolor.c 807] ColormapFull. Using subsititutions

Is fl_show_error(0) supposed to prevent this type
of messages ? Should fl_show_error(0) be called
before or right after fl_initialize() ?

--Tristan
_________________________________________________
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/