Make your callback function static.
Find a way to store the class object pointer with so that when your
function
gets called, it can then use this pointer to call a non-static function.
Like so:
class MyClass
{
private:
static Boolean handleEventCB (EventPtr eventPtr); // <-- assign this
as your event callback function
Boolean handleEvent (EventPtr eventPtr);
};
Boolean MyClass::handleEventCB (EventPtr eventPtr)
{
MyClass * ptr = (get the class pointer from wherever you saved it);
return ptr->handleEvent (eventPtr);
}
Boolean MyClass::handleEvent (EventPtr eventPtr)
{
// do the actual event handling code here
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html