A user running my application on a Palm IIIx with OS 3.1 reported an unusual bug. I reproduced it under POSE with a OS 3.0 debug ROM. When I call:
if ( FrmGetObjectId( form, FrmGetControlGroupSelection( form, ... ) ) == ...) I get an "Invalid index" error. Decomposing the code, I tried: UInt16 i = FrmGetControlGroupSelection( form, ... ); and I get 316, for a form that has less than 100 objects. Reading the API reference, I see that this API returned a byte instead of a UInt16 prior to OS 3.5. Trying: UInt8 byte = FrmGetControlGroupSelection( form, ... ); I get byte = 60, a difference of 256... Why does the results get shifted by 8 bits like this? Is it possible to write such code that can run properly on both pre/post-3.5 OS without explicitly testing for the OS version? -- Luc Le Blanc -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
