> I'm using fltk2.
> The error is invalid use of statement wc in static member function.
> This is just an abridgement of the source.
Can you put together a small, complete, compilable example that fails?
I append an example that works for fltk1 on CentOS 4.5.
Cheers
Duncan
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <cstdio>
#include <list>
class UserInterface : public Fl_Double_Window
{
public:
UserInterface(int X, int Y, const char* L=0)
: Fl_Double_Window(X, Y, L)
{
this->callback((Fl_Callback*)UserInterface::onWindowClose_, this);
}
static void onWindowClose_(Fl_Double_Window* widget, void* data)
{
UserInterface* ui = (UserInterface*)data;
ui->onWindowClose(widget, data);
}
protected:
void onWindowClose(Fl_Double_Window* widget, void* data)
{
printf("widget=%lx data=%lx\n", widget, data);
this->hide();
}
};
int main(int argc, char* argv[])
{
UserInterface* ui = new UserInterface(100, 100, "ui");
ui->show(argc, argv);
std::list<UserInterface*> wc;
wc.push_back(ui);
return Fl::run();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk