Hi,
In an app I wrote I was using tables all over the place so I put all the
table logic in a single table class. In the table class, I made the table
draw function a virtual callback. In order to locate the "this" pointer for
a given table class, I store the table id and class instance in a global
class list. In my global table draw callback function I lookup the table id
to get the class instance. Remember, the table id is passed to the global
table draw callback function. From the "this" pointer I then call the
virtual draw method.
Hope this helps.
Chris
-----Original Message-----
From: 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.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html