Seems to me that the whole gadget handling mechanism is now broken when UI structures
are made opaque. One's gadget handler callback is passed a pointer to the gadget, the
command and the event in the gadget callback. Problem is, now the gadget pointer is
useless (because it's opaque). Even worse, I now have no way of retrieving the
gadget's data, because I don't know (and don't want to care) what gadget it really is.
I think a little more form glue is necessary to make the callback mechanism actually
useful, at least:
void* FrmGlueGetGadgetDataFromGadget(FormGadgetType* gadgetP);
and probably
void FrmGlueGetGadgetBoundsFromGadget(FormGadgetType* gadgetP, RectangleType*
rect);
UInt16 FromGlueGetGadgetIDFromGadget(FormGadgetType* gadgetP);
I know that one can retrieve these pieces of data by using the corresponding Form
functions, but the thing is that in my dynamically created form, when I'm in the
gadget callback, I don't know what the ID or index of the gadget is, and I don't want
to care, and I shouldn't have to care, right?
Comments? Suggestions?
Thanks,
Kevin
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/