Also, make sure one of your other routines isn't eating up all the
nilEvents. The OS uses them to motivate some UI elements. I would suggest
that any routine you have that triggers on a nilEvent should always return
false.
-----Original Message-----
From: Steve Sabram <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: Monday, March 27, 2000 4:35 AM
Subject: Re: Terminating repeat buttons
>
>
>Remo wrote:
>
>> In article <6251@palm-dev-forum>, "revcom" <[EMAIL PROTECTED]> wrote:
>>
>> > Hi there,
>> >
>> > I have a number of REPEATBUTTONS that are working fine except that
after the
>> > pen is lifted, the button stays inverted. These buttons are actually
form
>> > bitmaps, overlayed with empty text buttons.
>> >
>> > Is handling ctlRepeatEvent events sufficient, or do I have to take
>> > additional action on something like a penUp event as well (eg to
manually
>> > re-invert the button)
>> >
>> > I am handling the buttons with the following code:
>> >
>> > case ctlRepeatEvent:
>> > {
>> > switch (pEvent->data.ctlEnter.controlID) {
>> >
>> > case CLEAR:
>> > if (areaAnimating(&g.studentWords)) {
>> > handled = true;
>> >...
>>
>> I think, when handling ctlRepeatEvents, handled should never be set to
>> true in order to tell the system, that is has some other work to do (like
>> deselecting the button after pen up).
>
>That is right. NEVER set "handled" to true for repeat buttons. Just tap
into the event stream to do whatever you want and then
>pass it back to the OS as handled. Thus, the OS can do just that
(deselecting the button) and create the button clicking sounds.
>
>Steve
>
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html