le 31/01/2000 12:41, adam hamflett � [EMAIL PROTECTED] a �crit�:
> How do i use event handlers if they are a member function of a class.
>
> I need to create a object and use of its functions as a event handler.
>
> I know in motif (which is in c) i can declare it as static and pass the
> objects "this" pointer with the call back but not sure how this will
> work on the palm event handlers.
>
> has any one got any ideas.
>
> cheers
>
> adam.
>
What I do is I create static methods which call member methods of the app,
like the following:
StaticMainFormHandler()
{
MyApp->MainFormHandler();
}
or if you have a c++ form object
StaticMainFormHandler()
{
MainForm->Handler();
}
this is less safe because it is not 100% sur that the MainForm c++ object is
allocated at the time the call is made.
Eric
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html