HP Forums
wait(-1) kinetic scrolling - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: wait(-1) kinetic scrolling (/thread-5074.html)



wait(-1) kinetic scrolling - fabila - 11-04-2015 12:36 AM

In a standard scrolling i get a list:
when i touch{0,x,x}, while scrolling {1,x,x}, when i stop touching {2}

in a kinetik scrolloing
when i touch{0,x,x}, while scrolling {1,x,x}, when i stop touching screen dont get nothing

How to identify a kinetic scrolling ?

sorry for my bad english


RE: wait(-1) kinetic scrolling - Tim Wessman - 11-04-2015 02:15 AM

Normally, you should not need to do so. What is happening with kinetic scrolling is that the system internally triggers a timer that counts down until stop. Scroll messages are sent until the timer runs out (with math to handle decreasing in a certain pattern as a function or initial velocity and length of the timer). As long as you are handling a scroll properly, nothing else is needed in your implementation. In fact, there is no where in the system that we've had a need to do any special handling on scrolling.

Is there a particular need or reason you feel you need a message at the end?


RE: wait(-1) kinetic scrolling - fabila - 11-04-2015 03:53 PM

I think there should be a pointer to start the kinetic scroll, to isolate and discriminate if its necessary.



Creo que es necesiario insertar un punto de control para el scroll cinetifoc para poder identificiarlo aislarlo y descriminarlos si fuese necesario.

Saludos.


RE: wait(-1) kinetic scrolling - Han - 11-04-2015 05:16 PM

(11-04-2015 12:36 AM)fabila Wrote:  In a standard scrolling i get a list:
when i touch{0,x,x}, while scrolling {1,x,x}, when i stop touching {2}

in a kinetik scrolloing
when i touch{0,x,x}, while scrolling {1,x,x}, when i stop touching screen dont get nothing

How to identify a kinetic scrolling ?

sorry for my bad english

Use MOUSE() in addition to WAIT(-1). Have WAIT(-1) detect if mouse events occur, and if so, use the MOUSE() command to determine kinetic scrolling.

Code:

  LOCAL key;

  // change run to 0 to exit the while loop
  key:=WAIT(-1);
  CASE
    IF TYPE(key)==6 THEN
      // we have touchscreen events
      CASE
        IF key(1)==0 THEN kmMouseDown(); END; // do kinetic scrolling here
        IF key(1)==1 THEN kmMouseUp(); END;
        // ... more mouse events
        IF key(1)==7 THEN kmMouseLongClick(); END;

        kmMouseEvent(); // default handler
      END;
    END; // end of touch events

    // at this point, all touch events were handled due to the
    // TYPE(key)==6 check; so only key-presses are left
    // and if a touch event occurred, these tests below are
    // never reached

    IF key==0 THEN kmDoAppsKey(); END;
    // ... more key definitions here
    IF key==50 THEN kmDoPlusKey(); END;

    kmOtherEvents(); // handle all remaining undefined keys
  END;



RE: wait(-1) kinetic scrolling - Carlos295pz - 07-25-2017 05:42 AM

It would be good that WAIT (-1) returns a "Mouse up" after completing the kinetic scrolling.


RE: wait(-1) kinetic scrolling - Tim Wessman - 07-25-2017 04:30 PM

Why? What would that be used for?


RE: wait(-1) kinetic scrolling - cyrille de brébisson - 07-26-2017 05:19 AM

Hello,

From what I remember, there is one spot in the system where we do something special on Kinetic scroll, and I had to add some info (flag) to identify it, however, I do not remember the exact what/why. And this is, unfortunately, not user accessible. Sorry.

Cyrille