I am about to write a similar thing (your original gadget, not the dynamic stuff). I was intending to completely handle pen tracking inside the gadget handler, as is done by lists etc.
What is my point? Not sure exactly, perhaps wondering if anyone has comments on doing pen tracking inside a gadget handler and not releasing control back to the main event loop until the pen is lifted... Sorry, can't comment on your issue. Matt At 01:24 PM 1/3/2002 -0500, you wrote: >I used an extended gadget in a little utility application a while >ago. While developing it I found a couple of things strange in the way >that extended gadgets are implemented in Palm OS. Now I'm converting some >home-grown dynamic UI (written before Palm OS supported it) and am trying >to port some gadget based controls into 4.0 compliant extended gadgets, >and the same strangeness is bothering me, but now the strangeness is >actually a development problem. > >What is that strangeness you ask? > >Well, extended gadgets work by associating a callback routine with the >gadget so that FrmHandleEvent can pass events to your gadget. This >"GadgetHandleEvent" callback function handles the event destined for your >gadget. In my earlier development, I found it strange that one gets >frmGadgetEnter events in the gadget handler, but one never gets penMove, >penDown or penUp events in the gadget. This forces one to handle these >events in the form handler, thus separating the work of tracking these >things between the form handler and the gadget handler. Specifically, I >was forced to set a flag (penCaptured) on the frmGadgetEnter event and >then process penMove events in the form handler and then unset the >penCaptured flag on the penUp (are you with me still?). It just seemed >kind of schizoid to me... > >So, my question is: how come pen events that are in the gadget are not >passed to the gadget by the form handle event? My problem now is that in >my dynamic UI, I have a single form that is continuously created and >destroyed with script generated screens. This base form has a generic >event handler and I was hoping to keep all gadget-specific handling in the >gadget handler. However, because of the "split handling" of events, I >cannot do this. I don't want to have to forward pen events from the form >to the gadget because I would have to have some knowledge of the gadget to >do so, and I don't want to care what gadgets are on the form from the form >handler... > >Am I missing something? > >Thanks, >Kevin > >-- >For information on using the Palm Developer Forums, or to unsubscribe, >please see http://www.palmos.com/dev/tech/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
