"Jacky Cheung" <[EMAIL PROTECTED]> wrote in message
news:33462@palm-dev-forum...
>
> I tried to disable a control button by using
>
> CtlSetEnabled( ...., false);
> Myfunction();
> CtlSetEnabled( ....., true);
>
> but when I press the button during the execution of Myfunction(), the
system
> still respond to the button I pressed during that time after Myfunction()
> has finished.
> Any idea?

Is there an event loop active during Myfunction()?  If not, then your
penDownEvent isn't being handled until after you return from MyFunction and
call CtlSetEnabled(), so when the event loop is entered, your control is
enabled again.

--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>



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