I use a lot of push button groups on my Palm apps.

* Is there a way to get the Metrowerks constructor to provide a useful
symbolic name for the group ids? It seems that I have to come up with a
groupID number myself, and the names created in the .h file by the
Metrowerks contructor are unintelligable, like FormGroupID2, and seem to
sometimes change (e.g., if I delete or add a new control group number to
the form, the name associated with the ID "3" will change!). So I have
been using constants in my code, but that seems wrong.

* Internally, in my data structures, I keep the value associated with
the push button group in an enumerated type. To set the control group
using FrmSetControlGroupSelection, and to access the value later using
FrmGetControlGroupSelection, I seem to need a pair of functions, one
with a switch that maps the controlID of the widget to the enum value,
and the other with a switch statement to do the reverse mapping (and one
takes the object index and the other the control id, just to be more
confusing). Is that what others do or is there a better way? I have
about a dozen of these pairs of functions containing these switch
statements (one for each push-button group), which seems wasteful. For
popup menu widgets, this kind of thing isn't necessary since I can just
get the index of the item in the list and cast that into the enum value.

Thanks,
Brad Myers

-- 
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