2012-11-23 17:14 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* harbour/contrib/xhb/xhbtedit.prg
  * harbour/contrib/hbmysql/tsqlbrw.prg
  * harbour/contrib/hbodbc/browodbc.prg
    % eliminated NextKey() calls
    ; TOFIX: BrowseODBC() just like dbEdit() ignore setKey() actions
             If key is pressed during stabilization faze. I think it's
             implementation problem not intentional decision and it
             should be fixed - there is nothing worse then application
             which ignores some keystrokes if user types to fast ;)
             I'd like to ask authors of above code to check it.
    ; I haven't touched xhb/xhbmemo.prg - it makes some hacks with
      keyboard polling so it's serious chance I would break sth.
This commit is contained in:
Przemyslaw Czerpak
2012-11-23 16:15:09 +00:00
parent 8e384fcbb0
commit 6f5d5a964c
4 changed files with 33 additions and 14 deletions

View File

@@ -10,6 +10,20 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2012-11-23 17:14 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/contrib/xhb/xhbtedit.prg
* harbour/contrib/hbmysql/tsqlbrw.prg
* harbour/contrib/hbodbc/browodbc.prg
% eliminated NextKey() calls
; TOFIX: BrowseODBC() just like dbEdit() ignore setKey() actions
If key is pressed during stabilization faze. I think it's
implementation problem not intentional decision and it
should be fixed - there is nothing worse then application
which ignores some keystrokes if user types to fast ;)
I'd like to ask authors of above code to check it.
; I haven't touched xhb/xhbmemo.prg - it makes some hacks with
keyboard polling so it's serious chance I would break sth.
2012-11-23 16:22 UTC+0100 Viktor Szakats (harbour syenar.net)
* website/js/shBrushHarbour.js
% limited the number of known functions to non-internal

View File

@@ -331,10 +331,16 @@ METHOD BrowseTable( lCanEdit, aExitKeys ) CLASS TBrowseSQL
DO WHILE lKeepGoing
DO WHILE ! ::Stabilize() .AND. NextKey() == 0
DO WHILE .T.
nKey := Inkey()
IF ::Stabilize() .AND. nKey != 0
EXIT
ENDIF
ENDDO
nKey := Inkey( 0 )
IF nKey == 0
nKey := Inkey( 0 )
ENDIF
IF AScan( aExitKeys, nKey ) > 0
lKeepGoing := .F.

View File

@@ -109,12 +109,14 @@ FUNCTION BrowseODBC( nTop, nLeft, nBottom, nRight, oDataSource )
DO WHILE ! lExit
IF nKey == 0
DO WHILE ! oBrw:stabilize() .AND. NextKey() == 0
ENDDO
ENDIF
DO WHILE .T.
nKey := Inkey()
IF oBrw:stabilize() .OR. nKey != 0
EXIT
ENDIF
ENDDO
IF NextKey() == 0
IF nKey == 0
oBrw:forceStable()
Statline( oBrw, oDataSource )
@@ -125,8 +127,6 @@ FUNCTION BrowseODBC( nTop, nLeft, nBottom, nRight, oDataSource )
Eval( bAction, ProcName( 1 ), ProcLine( 1 ), "" )
LOOP
ENDIF
ELSE
nKey := Inkey()
ENDIF
DO CASE

View File

@@ -695,12 +695,11 @@ METHOD Edit( nPassedKey ) CLASS XHBEditor
//
IF nPassedKey == NIL
IF NextKey() == 0
IF ( nKey := Inkey( , INKEY_ALL ) ) == 0
::IdleHook()
nKey := Inkey( 0, INKEY_ALL )
ENDIF
nKey := Inkey( 0, INKEY_ALL )
ELSE
lSingleKeyProcess := .T.
@@ -3068,11 +3067,11 @@ METHOD BrowseText( nPassedKey, lHandleOneKey ) CLASS XHBEditor
// If I haven't been called with a key already preset, evaluate this key and then exit
IF nPassedKey == NIL
IF NextKey() == 0
IF ( nKey := Inkey() ) == 0
::IdleHook()
nKey := Inkey( 0 )
ENDIF
nKey := Inkey( 0 )
ELSE
nKey := nPassedKey
ENDIF