Your callback function can remain as a member of the class if it is 'static'.
Do this for code cleanliness (all of the implementation code will be
contained entirely within the class). Also, by making the callback function
a member of the class, you don't have to write access functions to get to the
'private' members of the class.
So, something like this will do:
class StuffClass {
...
public:
static void StuffViewDrawName(...);
...
};
void StuffClass::StuffViewDrawName(...)
{
...
}
and specify it as 'StuffClass::StuffViewDrawName' when used as a callback
function pointer.
Best regards,
-Pete
<< Guys-
Thanks for the response. That's pretty much what I figured, I just wanted to
be sure. To clarify,
I will make:
static void StuffViewDrawName(...); // static method
Then, I will stuff into the TableRowData the 'this' pointer for the current
object, and then in my static callback, I can access things in the class like:
void
StuffViewDrawName(...)
{
StuffClass* myThis = grabTableData(row);
WinDrawChars(myThis->getTextString(), ...);
}
Does that sound like a plan?
BTW - thanks a TON for the quick help!
Alan >>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/