Delay from KeyPress to screen

  • I can't seem to find why there is a delay between the end-user pressing a Key and for the Char to appear on the screen.

    Depending on the situation, we can get up to five chars behind what the user is typing. There is also lots of flickering while typing.

    I just started a new job and this is my first task, so if you're missing critical information to help me out, just ask ...

    TIA,

    Green_Flyer

    • Offizieller Beitrag

    Hi,

    >>Depending on the situation, we can get up to five chars behind what the user is typing. There is also lots of flickering while typing. <<

    In WPTools 4 the header and footer are painted by the lines close to them, so if you type in the line right under the header or just before the footer the header/footer has to be repainted. That causes flickering and it was not possible to fix that.

    WPTools 4 uses quite a bit extra code to avoid flickering (most important is to paint the backgriound as part of the characters and not clear the background) but I admit, there is flickering envolved.

    This was one of the reasons why it was decided to completeley rewrite the component for version 5. In Version 5 you will not find any flicker and you ca type INSIDE the header and footer areas since those are implemented as text layers. Text layers are also used by the "Premium" edition to implement text boxes (=frames) and footnotes. I don't think there is yet a single other text control which does footnotes :-)

    WPTools Version 5 also strictly seperates between data and display, this makes features such as a split screen editing possible.

    Since almost all the code is new converting a version 4 based program can cause some extra work. Normally it does not - pretty much all the methods of V4 are also in V5, but if you have code which uses pointers to change the text (PTLine, PTAttr) this code has to be rewritten. There are no such pointers in WPTools 5. Instead you have the powerfull paragraph object (it used to be a record) with many methods which let you modify the text - not useing pointers.

    I recommend to try out V5 and at first compile some of the 50+ demo applications. When you got a "feeling what it does" try to convert your project. (make a backup!) If you come to a problem with your code which does not compile (the mentioned pointer code) it will be good to rethink the logic. Much of the code which used to require 20+ lines can be now done in 3.

    I hope this helps,

    Julian