GTK+1.3 classes. and www com



Hi, I have a problem conserning gtk and classes in c++..
It's when I call class-method from a class-method with the help of gtk_signal_connect().

Short example.
---Cut here----
class Window {
  public:
    GtkWidget *button;
    Window() {
       gtk_signal_connect(GTK_OBJECT(button), "clicked", 
           GTK_SIGNAL_FUNC(button_functio), NULL);
    }
    void button_function() {
      /* Some junk here. */
    }
}

void Window::button_function()
{
  /*  Some junk here. */
}

int main(int argv, char **argc)
{
  gtk_init(&argv, &argc);
  Windows w;
  gtk_main();
}
---and here---
(Lacks a lot of things to make it work, but just a short example)

This doesn't work, and you get a error-message of the type 'void <*>' is not 'void', but if I change void 
button_function() to static void button_function() this works, but ofcourse I can't have the function static. 
Any ideas?

//David



------------------------------------------------------------
WWW.COM - Where the Web Begins! http://www.www.com


---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]