On Mon, 2002-08-26 at 05:40, Bill Heidler wrote:
> A couple of weeks ago I tried to use an object class method in a call to
> TblSetLoadDataProcedure( ), and couldn't get it to work.  I got a
> compile-time error to the effect that the function signature didn't match
> TableLoadDataFuncType, and the only difference was that the class method was
> qualified by the class name (sorry, I don't have the exact error message
> handy, but can construct an example if necessary).
> 
>  Has anyone else run into this, or know a way around it?  I tried various
> kinds of casts, etc., to no avail.  I do not consider myself a C++ language
> "expert", but definitely believe in using OO techniques as much as possible.

You can't use a class method as a callback. See 

 http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-32.2

Basically, you have to use a static method and the static method can
call the class method after somehow acquiring the pointer to the
appropriate object. You will have to decide on the mechanism to use to
allow the static method find that pointer.

--
Dave Carrigan
Seattle, WA, USA
[EMAIL PROTECTED] | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL





-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to