Gtk+ g_signal_connect erro

1. Gtk+ g_signal_connect erro

mazin
mazinsw

(usa Ubuntu)

Enviado em 23/07/2010 - 19:39h

olá pessoal estou com um problema quando vou compilar esse código;


class Form
{
private:
GtkWidget *widget;
int OnClose(GtkWidget *widget, gpointer data);

public:
Form();
};

Form::Form()
{
g_signal_connect(G_OBJECT(this->widget), "delete_event",
G_CALLBACK(this->OnClose), NULL);
}


o erro:
sgtk.cc:136: error: invalid use of member (did you forget the ‘&’ ?)

eu ja coloquei o & mas deu outro erro:
sgtk.cc:136: error: ISO C++ forbids taking the address of a bound member function to form a pointer to member function. Say ‘&Form::OnClose’