Hello to everybody!
A few days ago i sent a mail to the list in which i asked about how to
pass a C++ member function as a callback, Mr. Zhao gave me an answer
which got me out of the problem, now i can easily use member functions
within callbacks by recovering the 'this' pointer stored in u_vdata.
But now I have another little problem, i am working with an OpenGL canvas
and i want to do the same thing inside the canvas handler function, this
is i need to recover the 'this' again, but this time the solution given
before doesn't seem to work correctly, i get a "core dump" every time i
try to access the object by using the recovered 'this'.
Is it because a conventional callback is different from the canvas
handler? Even if both of them receive a FL_OBJECT *ob, I guess that maybe
the problem is that the FL_OBJECT in the canvas handler and the one in the
conventional callback don't share the same u_vdata or something like
that...
I tried also to change the void *user_data parameter with a pointer to my
class and tried to send the 'this' on the fl_add_canvas_handler function
but this seems useless (core dump again...).
I will again appreciate any solutions on this problem.
Thank You!
Humberto Cervantes
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/