The OS was changed in 4.0 to be consistent. In previous versions, the order
used to display overlapping objects was inconsistent with the order used for
hit testing. Tapping on an object would be detected an a hit on the bottom
object that was visually obscured. In 4.0, this was fixed so that the tap is
interpreted as being a hit on the top object. The order in which the objects
are drawn is determined by the order they are placed in the form resource.
This order also defines the object indices (what FrmGetObjectIndex returns).
Constructor has had bugs in this area, so make sure you've got the very
latest version. The hierarchy view should allow you to drag and drop to
rearrange the form objects in any order you choose, independent of the
object IDs.
In order to maintain compatibilty with both 4.0 and previous OS versions,
you'll need to either avoid overlapping objects (not a bad idea in general,
but sometimes impractical), or forward hits that are incorrectly routed on
older OS versions to the proper place. For an example of this latter
approach, see the AgendaDividerDraw routine in DateAgenda.c in the Palm OS
4.0 SDK Datebook source code. This is an ugly hack, and you can probably
come up with a better approach.
It's always difficult to make OS changes like this because you know you're
going to cause a headache for developers who now need to support both
variants, but in the long run, you've got to fix problems in order to make
the platform easy to develop for.
--
Peter Epstein
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/