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