diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 68c92d7937..578c219f04 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,19 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-17 10:16 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/debug/dbgtobj.prg + * source/debug/dbgthsh.prg + * source/debug/debugger.prg + * source/debug/dbgtarr.prg + * Changed rest of GETs to __dbgInput() + + * source/rtl/listbox.prg + - Removed saving cursor position and color, + and changing default color. + + ; NOTE: Couldn't replicate Mono display RTE. + 2008-10-17 03:13 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/debug/dbgtwin.prg * use hb_scroll() instead of scroll() diff --git a/harbour/source/debug/dbgtarr.prg b/harbour/source/debug/dbgtarr.prg index 1c19466ea8..72d3c8834b 100644 --- a/harbour/source/debug/dbgtarr.prg +++ b/harbour/source/debug/dbgtarr.prg @@ -51,7 +51,6 @@ */ #pragma DEBUGINFO=OFF -#define HB_NO_READDBG #define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */ #include "hbclass.ch" @@ -158,33 +157,17 @@ METHOD addWindows( aArray, nRow ) CLASS HBDbArray METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbArray -#ifndef HB_NO_READDBG - LOCAL nKey LOCAL oErr - LOCAL GetList := {} - LOCAL lScoreSave := Set( _SET_SCOREBOARD, .F. ) - LOCAL lExitSave := Set( _SET_EXIT, .T. ) - LOCAL bInsSave := SetKey( K_INS ) - LOCAL cValue := PadR( __dbgValToStr( pItem[ nSet ] ),; - oBrowse:nRight - oBrowse:nLeft - oBrowse:GetColumn( 1 ):width ) + LOCAL cValue := PadR( __dbgValToStr( pItem[ nSet ] ),; + oBrowse:nRight - oBrowse:nLeft - oBrowse:GetColumn( 1 ):width ) // make sure browse is stable oBrowse:forceStable() // if confirming new record, append blank - // set insert key to toggle insert mode and cursor - SetKey( K_INS, { || SetCursor( iif( ReadInsert( ! ReadInsert() ),; - SC_NORMAL, SC_INSERT ) ) } ) - - // initial cursor setting - SetCursor( iif( ReadInsert(), SC_INSERT, SC_NORMAL ) ) - - // create a corresponding GET - @ Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1 GET cValue ; - VALID iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) - - READ + cValue := __dbgInput( Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1,, cValue, ; + { iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } ) IF LastKey() == K_ENTER BEGIN SEQUENCE WITH {|oErr| break( oErr ) } @@ -194,25 +177,12 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbArray END SEQUENCE ENDIF - SetCursor( SC_NONE ) - Set( _SET_SCOREBOARD, lScoreSave ) - Set( _SET_EXIT, lExitSave ) - SetKey( K_INS, bInsSave ) - // check exit key from get nKey := LastKey() IF nKey == K_UP .OR. nKey == K_DOWN .OR. nKey == K_PGUP .OR. nKey == K_PGDN KEYBOARD Chr( nKey ) ENDIF -#else - - HB_SYMBOL_UNUSED( oBrowse ) - HB_SYMBOL_UNUSED( pItem ) - HB_SYMBOL_UNUSED( nSet ) - -#endif - RETURN NIL METHOD SetsKeyPressed( nKey, oBrwSets, oWnd, cName, aArray ) CLASS HBDbArray diff --git a/harbour/source/debug/dbgthsh.prg b/harbour/source/debug/dbgthsh.prg index 627be6d517..c376b066b1 100644 --- a/harbour/source/debug/dbgthsh.prg +++ b/harbour/source/debug/dbgthsh.prg @@ -52,7 +52,6 @@ */ #pragma DEBUGINFO=OFF -#define HB_NO_READDBG #define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */ #include "hbclass.ch" @@ -163,33 +162,17 @@ METHOD addWindows( hHash, nRow ) CLASS HBDbHash METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbHash -#ifndef HB_NO_READDBG - LOCAL nKey LOCAL oErr - LOCAL GetList := {} - LOCAL lScoreSave := Set( _SET_SCOREBOARD, .F. ) - LOCAL lExitSave := Set( _SET_EXIT, .T. ) - LOCAL bInsSave := SetKey( K_INS ) - LOCAL cValue := PadR( __dbgValToStr( HB_HValueAt( pItem, nSet ) ),; - oBrowse:nRight - oBrowse:nLeft - oBrowse:GetColumn( 1 ):width ) + LOCAL cValue := PadR( __dbgValToStr( HB_HValueAt( pItem, nSet ) ),; + oBrowse:nRight - oBrowse:nLeft - oBrowse:GetColumn( 1 ):width ) // make sure browse is stable oBrowse:forceStable() // if confirming new record, append blank - // set insert key to toggle insert mode and cursor - SetKey( K_INS, { || SetCursor( iif( ReadInsert( ! ReadInsert() ),; - SC_NORMAL, SC_INSERT ) ) } ) - - // initial cursor setting - SetCursor( iif( ReadInsert(), SC_INSERT, SC_NORMAL ) ) - - // create a corresponding GET - @ Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1 GET cValue ; - VALID iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) - - READ + cValue := __dbgInput( Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1,, cValue, ; + { iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } ) IF LastKey() == K_ENTER BEGIN SEQUENCE WITH {|oErr| break( oErr ) } @@ -199,25 +182,12 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbHash END SEQUENCE ENDIF - SetCursor( SC_NONE ) - Set( _SET_SCOREBOARD, lScoreSave ) - Set( _SET_EXIT, lExitSave ) - SetKey( K_INS, bInsSave ) - // check exit key from get nKey := LastKey() IF nKey == K_UP .OR. nKey == K_DOWN .OR. nKey == K_PGUP .OR. nKey == K_PGDN KEYBOARD Chr( nKey ) ENDIF -#else - - HB_SYMBOL_UNUSED( oBrowse ) - HB_SYMBOL_UNUSED( pItem ) - HB_SYMBOL_UNUSED( nSet ) - -#endif - RETURN NIL METHOD SetsKeyPressed( nKey, oBrwSets, oWnd, cName, hHash ) CLASS HBDbHash diff --git a/harbour/source/debug/dbgtobj.prg b/harbour/source/debug/dbgtobj.prg index 21caf6f755..d4c7c94b04 100644 --- a/harbour/source/debug/dbgtobj.prg +++ b/harbour/source/debug/dbgtobj.prg @@ -51,7 +51,6 @@ */ #pragma DEBUGINFO=OFF -#define HB_NO_READDBG #define HB_CLS_NOTOBJECT /* do not inherit from HBObject calss */ #include "hbclass.ch" @@ -177,14 +176,8 @@ METHOD addWindows( aArray, nRow ) CLASS HBDbObject METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbObject -#ifndef HB_NO_READDBG - LOCAL column LOCAL nKey - LOCAL GetList := {} - LOCAL lScoreSave := Set( _SET_SCOREBOARD, .F. ) - LOCAL lExitSave := Set( _SET_EXIT, .T. ) - LOCAL bInsSave := SetKey( K_INS ) LOCAL cValue LOCAL lCanAcc LOCAL oErr @@ -193,7 +186,6 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbObject oBrowse:forceStable() // if confirming new record, append blank - // get column object from browse column := oBrowse:getColumn( oBrowse:colPos ) @@ -205,22 +197,8 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbObject ENDIF cValue := PadR( __dbgValToStr( cValue ), column:Width ) - // set insert key to toggle insert mode and cursor - SetKey( K_INS, { || SetCursor( iif( ReadInsert( ! ReadInsert() ),; - SC_NORMAL, SC_INSERT ) ), inkey(0) } ) - - // initial cursor setting - SetCursor( iif( ReadInsert(), SC_INSERT, SC_NORMAL ) ) - - @ Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1 GET cValue ; - VALID iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) - - READ - - SetCursor( SC_NONE ) - Set( _SET_SCOREBOARD, lScoreSave ) - Set( _SET_EXIT, lExitSave ) - SetKey( K_INS, bInsSave ) + cValue := __dbgInput( Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1,, cValue, ; + { iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } ) IF LastKey() == K_ENTER BEGIN SEQUENCE WITH {|oErr| break( oErr ) } @@ -236,14 +214,6 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbObject KEYBOARD Chr( nKey ) ENDIF -#else - - HB_SYMBOL_UNUSED( oBrowse ) - HB_SYMBOL_UNUSED( pItem ) - HB_SYMBOL_UNUSED( nSet ) - -#endif - RETURN NIL METHOD SetsKeyPressed( nKey, oBrwSets, nSets, aArray ) CLASS HBDbObject diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index 16505b6b6d..f35685b61e 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -3306,7 +3306,7 @@ STATIC FUNCTION strip_path( cFileName ) RETURN cName + cExt -STATIC FUNCTION __dbgInput( nRow, nCol, nWidth, cValue, bValid, cColor, nSize ) +FUNCTION __dbgInput( nRow, nCol, nWidth, cValue, bValid, cColor, nSize ) LOCAL nOldCursor := SetCursor( SC_NORMAL ) LOCAL cTemp := cValue diff --git a/harbour/source/rtl/listbox.prg b/harbour/source/rtl/listbox.prg index 82de754605..c5679c5fa6 100644 --- a/harbour/source/rtl/listbox.prg +++ b/harbour/source/rtl/listbox.prg @@ -227,10 +227,6 @@ METHOD delItem( nPos ) METHOD display() CLASS LISTBOX - LOCAL nOldRow - LOCAL nOldCol - LOCAL cOldColor - LOCAL nItem LOCAL nEnd LOCAL cColor4 @@ -279,20 +275,7 @@ METHOD display() CLASS LISTBOX hb_dispBox( nTop, nLeft, ::nBottom, ::nRight, cHotBox, cColorScrl ) IF ::oVScroll != NIL - - /* Is it necessary to save, set and restore color and cursor - * position for ::oVScroll:display() or we can remove it? - */ - nOldRow := Row() - nOldCol := Col() - cOldColor := SetColor() - SetColor( cColorScrl ) - ::oVScroll:display() - - SetColor( cOldColor ) - SetPos( nOldRow, nOldCol ) - ENDIF nTop++