Thanks, doing it the way you suggest compiles OK once I found out how to pass the va_list to an inner routine. I can't report on testing yet until I fix a few other things.
On Sunday, July 31, 2022 at 5:20:01 PM UTC-4 Ian MacArthur wrote:
On 31 Jul 2022, at 22:03, George Reeke wrote:
>
> I am at fltk 1.3.5 but also trying 1.3.8
> Doc says I can provide my own versions of Fl::error() and Fl::fatal() to override the default actions (basically exit). I am providing this code in my routine, compiling with gcc, and I get an error message "no 'void Fl::error(const char*, ...)' member function declared in class 'Fl'.
> My code is this:
> void Fl::error(const char *fmt, ...) __attribute__((noreturn));
> void Fl::error(const char *fmt, ...) { <some code> }
> What do I have to do to replace the default functions with my functions?
Umm... I don’t think that’s they way it works.
Rather, you just make up your own function (of the appropriate signature, of course) and then assign that to Fl::error which is basically just a pointer to whatever the current error function is.
So something like (I’m freestyling this so it may not be literally correct...!)
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.