Do you mean pen up and pen down when you say key up and key down?

The key events are the arrows and the four app buttons.

If you do mean pen when you say key ... are you returning "true" or
"false" for handled from the event handler for those events.  If you
are returning "true" then the OS will do no further processing for
those events because you have told it that you've done everything
required.  If you want the OS to do hit testing, return "false" from
the event handler for the pen events.

--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!

Mark Hamann wrote in message <39666@palm-dev-forum>...
>
>I am pretty certain that the event handler is right because I get all the
>events in the event handler (frmOpenEvent, lots of nilEvents, etc).  I get
>the keyUpEvent and keyDownEvent in that event handler, but I don't get any
>ctlSelectEvents.  My impression is that the system event handler looks at
>the active form on the keyUpEvent or keyDownEvent and sees if the hit is
>inside a control.  The system then generates the ctlSelectEvent and changes
>colors of buttons, etc.  My problem is that I'm not getting
ctlSelectEvents.
>I am guessing that it is either because the system doesn't recognize my
>dynamically generated form or because the attribute bits 'enabled',
>'usable', and 'visible' are not set for the form, window, or controls.  And
>I can't get those bits to change.  I write 1 to them (despite the warning
in
>the docs that I should treat those as opaque), but they remain 0.  I keep
no
>form pointers around.  Everything is done with form pointers generated
>immediately before they are needed.
>
>My hair used to be monochrome, but now it has 4 gray-scales.
>
>Mark Hamann
>
>Steve Austin <[EMAIL PROTECTED]> wrote in message
>news:39629@palm-dev-forum...
>>
>> Just saw your second email.
>>
>> Are you sure you've set your event handler to be the active event
handler?
>> I don't create dynamic forms in my code, so I can't help you there.  What
>I
>> do know is whenever you create anything dynamicly, any form pointers that
>> you were using could be invalid.  This is because the form might have
been
>> moved (if there wasn't enough space to add the control onto it in
memory).
>> So whenever you create a new control  be sure and either use the new
>pointer
>> which you get back from that particular dynamic ui function (you probably
>> passed a form ptr by reference), otherwise call FrmGetActiveForm, if it
is
>> your active form that you're working with.
>>
>> I hope this helps.  I've seen some weird bugs when doing dynamic ui stuff
>> just slightly wrong.
>>
>> Steve
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]]On Behalf Of Mark
>> Hamann
>> Sent: Wednesday, February 14, 2001 9:32 AM
>> To: Palm Developer Forum
>> Subject: Re: Dynamic UI
>>
>>
>> I'm still spinning my wheels.  What I am doing is generating an entire
>form
>> from scratch.  I use FrmNewForm to make the form and CtlNewControl to put
>> buttons on it.  Then I use FrmGotoForm to make it the active form.  I get
>> the frmOpenEvent and draw the form on the screen, but when I try to click
>> the buttons, nothing happens.
>>
>> The penUpEvent and penDownEvents are coming to the form's event handler,
>but
>> they are apparently not being used in any sort of hit testing to generate
>> ctlSelectEvents.
>>
>> What do I have to do to detect that I'm clicking buttons?  The worst case
>> scenario is that I would have write my own hit test routine that cycles
>> through each object on the form, gets the object dimensions, sees if the
>pen
>> events are within those dimensions, and generates events.  But the code
to
>> do that obviously already exists in the PalmOS.  I am also not being
>> successful in turning the visible, enabled, and usable flags on on the
>
>form,
>> its window, and its objects.  Does the hit test code ignore my clicks
>> because these are off?
>>
>> I am stuck.  If anyone can guide me to a good Dynamic UI resource for
>PalmOS
>> 3.0 and higher besides the PalmOS Companion and Reference Guides, I will
>be
>> eternally grateful.
>>
>> Thank you,
>> Mark Hamann
>>
>>
>>
>>
>> --
>> 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/

Reply via email to