I've run into the same issue with PalmOS tables as well as
a host of X/Motif widget wrapper class over the years.  A
common solution is to store the "this" pointer for the
wrapper object in the user-data field of the widget (I use
the data field for row 0 on PalmOS).  I have a static
method of the wrapper class set as the event callback (in
the PalmOS case, the custom draw callback).  In the static
event callback method I get the object pointer out of the
user-data field and use it to call the appropriate
non-static event handler method.

HTH,

-- Paul

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
>  Behalf Of Dan Hewins
> Sent: Tuesday, February 22, 2000 7:28 PM
> To: Palm Developer Forum
> Cc: [EMAIL PROTECTED]
> Subject: C++ Palm Apps (Teenee)
>
>
> I saw Teenee on Roadcoders.  Nice.  I looked
> through it and I didn't
> see anthing on Table support in Teenee.  Have
> you addressed the issue
> of Tables in C++?  I am curious becuse I am
> creating a C++ Palm OS
> app in which a class takes care of all of the
> table stuff (loading,
> drawing, etc.) and I have run into a road block.
>  I want to set a
> call-back for the table item draw routine and I
> can't get it to work
> any way I can think of.  I tried this->DrawItem
> but that wouldn't
> compile.  The best I can think of would be to
> create a "wrapper"
> function in the "real" world that calls my
> class' draw routine.  But,
> that really destroys the black-box idea...  Any
> thought or insight
> would be appreciated.
>
> Thanks,
> Dan Hewins
> Synergy Solutions, Inc.
>
> --
> For information on using the Palm Developer
> Forums, or to unsubscribe, please see
> http://www.palm.com/devzone/mailinglists.html
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to