
Bind creates a function object, while XtAppAddTimeOut expects a function pointer, as you mentioned. You can define a static member function that matches XtTimerCallbackProc signature, and pass it without bind. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Thanks, that was the way i did it before. But from a static member function i have no access to the object attributes, so i had to make it a singleton class that was what i wanted to prevent by using bind.
No, you don't have to make a signleton. The function XtAppAddTimeOut accepts "XtPointer client_data" argument, where you can pass "this". Then you get it back in the callback function, and type-cast it to its original type.