> I get these errors without editing any values. Here is the load data
> callback.
>
> Err pcMainTable::LoadData( Word row, Word column, Boolean editable,
>                            VoidHand *data, WordPtr dataOffset,
>                            WordPtr dataSize, FieldPtr fld )

This callback doesn't match the parameter list for the code called by the
system... it wants a function that matches

Err TableLoadDataFuncType (
    void *tableP, Int16 row, Int16 column,
    Boolean editable, MemHandle *dataH, Int16 *dataOffset,
    Int16 *dataSize, FieldPtr fld)

Your callback function has a different signature, leading with a hidden
"this" parameter, then all the parameters that are expected.  In your first
line, you're calling a method, which could be written as

   TablePtr table = this->GetHandle();

but your "this" value is actually already the handle to the table, so you're
doing really odd stuff.

Callbacks to C++ member functions really need static members so you don't
have the implicit "this" pointer messing up the function signature.  I
looked at doing something like this, but in order to do it right, you need
an extra data structure that would map table handles to your table wrapper
object.

--ben



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

Reply via email to