>This leads me to believe that there is some code in the Table.c file 
>that is buggy in that it assumes that the size of the tableItemStyles 
>enum is a byte always instead of an int if the project setting is set.

>Can you force an enum to be a certain size in the definition?  e.g.:

>enum Uint8 tableItemStyles { checkboxTableItem,
                        customTableItem,
                        ...
                        };

>Thoughts?
>Dan Hewins
>Synergy Solutions, Inc.

This certainly doesn't seem like a PalmOS bug. Basically, you can't redefine
a data type to be different from what that data type was defined as when
they built PalmOS itself! In other words, if PalmOS was compiled assuming
that "enums" are always bytes, then any enum that you pass into PalmOS had
better be only a byte or else unpredicatable things are going to happen.
Using project settings that are different in this respect from the PalmOS
"standard" are going to get you into trouble.

Actually, I don't think that an O/S API should use these types of somewhat
"abstract" language constructions at all, since they can be highly compiler
dependent. This issue of what the width of an "enum" is is a typical
problem, especially since it can be redefined in a "project settings" dialog
instead of being forced in a header or something.

  Doug Gordon


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

Reply via email to