Hi everybody.
Well, I have a problem.
In an object, I cannot successfully pass a "this" pointer with the function g_signal_connect
This prints 0, even if this->int_value is set to 510, 354, 54534 and so on.
Why ? and how could I pass the this pointer successfuly ?
Well, I have a problem.
In an object, I cannot successfully pass a "this" pointer with the function g_signal_connect
| Code: |
| g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(some_function), this); |
| Code: |
| void some_function(GtkWidget *widget, gpointer data) {
g_print("%d", (reinterpret_cast<the_object *>(data))->int_value); } |
This prints 0, even if this->int_value is set to 510, 354, 54534 and so on.
Why ? and how could I pass the this pointer successfuly ?
