Hello -

I realize why I shouldn't access this struct directly - I was doing a check for OS 3.5 or higher and using TblGetItemPtr. If not, I was planning on using the workaround below - that was documented in the Palm API doc. However, even when I add #ifdef ALLOW_ACCESS_TO_INTERNALS_OF_TABLES to my code, it still won't let me access the internals of the table item. Either that, or I am trying to find the best way to add pre 3.5 compatibility to the app. I could leave it out altogether, but I'd rather not.

Thanks,
Ed



If you look at the Table.h, you'll notice that there's a #ifdef within the
struc to protect / prevent it's use.
#ifdef ALLOW_ACCESS_TO_INTERNALS_OF_TABLES // These fields will not be
available in the next OS release!

That's Palm's way of saying don't use this directly because it'll go away.
So you want to use it, instead of #defing it (like some do), you should copy
it into your own code with your own name, then cast it as you wish.  This is
under the assumption that although it'll go away from the SDK, that's it's
likely that the internal structure will be maintained in some fashion.

You may be better off will a more custom solution yourself (using vectors or
maps etc.) - since there's no assurance that the internals will stay the
same.

Just an idea,

thanks - bill




I am using  TblGetItemPtr but want to make this compatible with OS < 3.5
so I am using:

list = table->items[row * table->numColumns + column].ptr;

to achieve the same thing.  However when compiling I get an error that
states:

Error   : illegal use of incomplete struct/union/class 'struct TableType'
frmMainTable.c line 8256             list = table->items[row *
table->numColumns + column].ptr;

I know I am probably overlooking something in the settings somewhere -
any ideas?

Thanks,
Edward




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

Reply via email to