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.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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++
|
||||
|
||||
Reference in New Issue
Block a user