2012-06-08 01:14 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/hbct/getsecrt.prg
  * contrib/hbgd/gdbar.prg
  * contrib/hbgd/gdbarcod.prg
  * contrib/hbhttpd/tests/eshop.prg
  * contrib/hbide/ideconsole.prg
  * contrib/hbide/idemisc.prg
  * contrib/hbodbc/browodbc.prg
  * contrib/hbodbc/todbc.prg
  * contrib/hbqt/hbmk2_qt.hb
  * contrib/hbqt/tests/wvtqt.prg
  * contrib/hbsqlit3/tests/hdbctest.prg
  * contrib/hbtip/tests/tiptest.prg
  * contrib/hbtip/thtml.prg
  * contrib/hbwin/tests/olesrv1.prg
  * contrib/hbwin/tests/testax.prg
  * contrib/hbxpp/browdbx.prg
  * contrib/hbxpp/tthreadx.prg
  * contrib/xhb/cstruct.prg
  * contrib/xhb/dirrec.prg
  * contrib/xhb/dumpvar.prg
  * contrib/xhb/htjlist.prg
  * contrib/xhb/tcgi.prg
  * contrib/xhb/tedit.prg
  * contrib/xhb/thtm.prg
  * contrib/xhb/ttable.prg
  * contrib/xhb/xcstr.prg
  * contrib/xhb/xhbcls.ch
  * contrib/xhb/xhberr.prg
  * contrib/xhb/xhbole.prg
  * contrib/xhb/xhbtedit.prg
  * doc/codebloc.txt
  * doc/en/command.txt
  * doc/en/objfunc.txt
  * include/hbpers.ch
  * include/std.ch
  * src/common/expropt1.c
  * src/compiler/hbmain.c
  * src/debug/dbghelp.prg
  * src/debug/dbgtarr.prg
  * src/debug/dbgthsh.prg
  * src/debug/dbgtobj.prg
  * src/debug/dbgwa.prg
  * src/debug/debugger.prg
  * src/rdd/dbfntx/dbfntx0.prg
  * src/rdd/hbsix/sxcompat.prg
  * src/rdd/usrrdd/rdds/hscdx.prg
  * src/rdd/usrrdd/rdds/rlcdx.prg
  * src/rtl/browdb.prg
  * src/rtl/browse.prg
  * src/rtl/dirscan.prg
  * src/rtl/errsys.prg
  * src/rtl/hbini.prg
  * src/rtl/listbox.prg
  * src/rtl/tclass.prg
  * src/rtl/tlabel.prg
  * src/rtl/tobject.prg
  * src/rtl/treport.prg
  * utils/hbtest/rt_mt.prg
    * some formatting (almost only whitespace)

  * contrib/xhb/dirrec.prg
  * src/rtl/dirscan.prg
    ! use directry.ch constants

  * contrib/hbqt/tests/draggable.prg
    ! hbformat and manual formats/cleanups

  * src/vm/maindllp/dllext.c
    ! fixed typo in recent addition
This commit is contained in:
Viktor Szakats
2012-06-07 23:18:44 +00:00
parent b45ffc3326
commit c0fff41758
61 changed files with 593 additions and 516 deletions

View File

@@ -16,16 +16,87 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-08 01:14 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbct/getsecrt.prg
* contrib/hbgd/gdbar.prg
* contrib/hbgd/gdbarcod.prg
* contrib/hbhttpd/tests/eshop.prg
* contrib/hbide/ideconsole.prg
* contrib/hbide/idemisc.prg
* contrib/hbodbc/browodbc.prg
* contrib/hbodbc/todbc.prg
* contrib/hbqt/hbmk2_qt.hb
* contrib/hbqt/tests/wvtqt.prg
* contrib/hbsqlit3/tests/hdbctest.prg
* contrib/hbtip/tests/tiptest.prg
* contrib/hbtip/thtml.prg
* contrib/hbwin/tests/olesrv1.prg
* contrib/hbwin/tests/testax.prg
* contrib/hbxpp/browdbx.prg
* contrib/hbxpp/tthreadx.prg
* contrib/xhb/cstruct.prg
* contrib/xhb/dirrec.prg
* contrib/xhb/dumpvar.prg
* contrib/xhb/htjlist.prg
* contrib/xhb/tcgi.prg
* contrib/xhb/tedit.prg
* contrib/xhb/thtm.prg
* contrib/xhb/ttable.prg
* contrib/xhb/xcstr.prg
* contrib/xhb/xhbcls.ch
* contrib/xhb/xhberr.prg
* contrib/xhb/xhbole.prg
* contrib/xhb/xhbtedit.prg
* doc/codebloc.txt
* doc/en/command.txt
* doc/en/objfunc.txt
* include/hbpers.ch
* include/std.ch
* src/common/expropt1.c
* src/compiler/hbmain.c
* src/debug/dbghelp.prg
* src/debug/dbgtarr.prg
* src/debug/dbgthsh.prg
* src/debug/dbgtobj.prg
* src/debug/dbgwa.prg
* src/debug/debugger.prg
* src/rdd/dbfntx/dbfntx0.prg
* src/rdd/hbsix/sxcompat.prg
* src/rdd/usrrdd/rdds/hscdx.prg
* src/rdd/usrrdd/rdds/rlcdx.prg
* src/rtl/browdb.prg
* src/rtl/browse.prg
* src/rtl/dirscan.prg
* src/rtl/errsys.prg
* src/rtl/hbini.prg
* src/rtl/listbox.prg
* src/rtl/tclass.prg
* src/rtl/tlabel.prg
* src/rtl/tobject.prg
* src/rtl/treport.prg
* utils/hbtest/rt_mt.prg
* some formatting (almost only whitespace)
* contrib/xhb/dirrec.prg
* src/rtl/dirscan.prg
! use directry.ch constants
* contrib/hbqt/tests/draggable.prg
! hbformat and manual formats/cleanups
* src/vm/maindllp/dllext.c
! fixed typo in recent addition
2012-06-07 07:52 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/tests/draggable.prg
! Uncommented: oWId:setAttribute( Qt_WA_TranslucentBackground )
! Uncommented: oWId:setAttribute( Qt_WA_TranslucentBackground )
2012-06-07 07:38 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/tests/draggable.prg
+ Added: a draggable Harbour Logo without titlebar.
* contrib/hbqt/tests/testres.prg
! Rewritten: per current hbQT implementation.
! Rewritten: per current hbQT implementation.
; Both are supplied by Bacco, thankyou.

View File

@@ -81,9 +81,9 @@ FUNCTION GETSECRET( cVar, nRow, nCol, lSay, xPrompt )
SETPOS( nRow, nCol )
AADD( GetList, _GET_( _CGETSECRET, "_CGETSECRET",,, ) )
ATAIL( GetList ):reader := { |oGet, oGetList| _SECRET( @_cGetSecret, @lHide, ;
oGet, oGetList ) }
ATAIL( GetList ):block := { |xNew| _VALUE( @_cGetSecret, lHide, xNew ) }
ATAIL( GetList ):reader := {| oGet, oGetList | _SECRET( @_cGetSecret, @lHide, ;
oGet, oGetList ) }
ATAIL( GetList ):block := {| xNew | _VALUE( @_cGetSecret, lHide, xNew ) }
READ
IF lSay

View File

@@ -306,7 +306,7 @@ METHOD CheckValInArray( cchar ) CLASS TBarCode
LOCAL npos
LOCAL uret
npos := AScan( ::keys, { |x| SubStr( x, 1, 1 ) == cchar } )
npos := AScan( ::keys, {| x | SubStr( x, 1, 1 ) == cchar } )
IF npos > 0
uret := npos

View File

@@ -450,7 +450,7 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
If cModeCode == "C"
npos := AsCAn( ::KeysmodeC, { |x| x == SubStr( ::Text, i, 1 ) + SubStr( ::Text, i+1, 1 ) } )
npos := AsCAn( ::KeysmodeC, {| x | x == SubStr( ::Text, i, 1 ) + SubStr( ::Text, i+1, 1 ) } )
If npos == 0
::DrawError("With Code C, you must provide always pair of two integers. Char "+SubStr( ::text, i, 1 )+SubStr( ::text, i+1, 1 )+" not allowed." )
@@ -477,7 +477,7 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
If !lerror
If Empty(cModeCode)
If Empty( cModeCode )
If Str( Val( ::text ), Len( ::text ) ) == ::text
@@ -487,16 +487,16 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
Else
For n := 1 TO Len( ::text )
nC += iif( substr( ::text ,n,1 ) > 31, 1, 0 )
For n := 1 TO Len( ::text )
nC += iif( substr( ::text, n, 1 ) > 31, 1, 0 )
Next
If nC < Len( ::text ) / 2
lTypeCodeA:= .t.
cconc := ::aCode[STARTA]
cconc := ::aCode[ STARTA ]
nSum := FNC1
Else
cconc := ::aCode[STARTB]
cconc := ::aCode[ STARTB ]
nSum := STARTA
EndIf
@@ -504,21 +504,21 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
Else
If cModeCode =='C'
If cModeCode == 'C'
lTypeCodeC := .T.
cconc := ::aCode[STARTC]
cconc := ::aCode[ STARTC ]
nSum := STARTB
Elseif cModeCode =='A'
lTypeCodeA := .t.
cconc := ::aCode[STARTB]
cconc := ::aCode[ STARTB ]
nSum := FNC1
Else
cconc := ::aCode[STARTB]
cconc := ::aCode[ STARTB ]
nSum := STARTA
EndIf
@@ -531,50 +531,50 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
nC ++
cchar := Substr(::text,n,1)
cchar := Substr( ::text, n, 1 )
if lTypeCodeC
If Len( ::TEXT ) == n
cconc += ::aCode[101]
nvalchar := Asc(cchar)-31
cconc += ::aCode[ 101 ]
nvalchar := Asc( cchar )-31
Else
nvalchar := Val(Substr( ::text,n,2 ) ) + 1
nvalchar := Val( Substr( ::text, n, 2 ) ) + 1
n++
EndIf
Elseif lTypeCodeA
If cchar > '_'
cconc += ::aCode[101]
nvalchar := Asc(cchar)-31
cconc += ::aCode[ 101 ]
nvalchar := Asc( cchar ) - 31
Elseif cchar <= ' '
nvalchar := Asc(cchar)+64
nvalchar := Asc( cchar ) + 64
Else
nvalchar := Asc(cchar)-31
nvalchar := Asc( cchar ) - 31
Endif
Else
If cchar < ' '
cconc += ::aCode[CODEA]
nvalchar := Asc(cchar)+64
cconc += ::aCode[ CODEA ]
nvalchar := Asc( cchar ) + 64
Else
nvalchar := Asc(cchar)-31
nvalchar := Asc( cchar ) - 31
EndIf
Endif
nSum += (nvalchar-1)*nC
cconc := cconc +::aCode[nvalchar]
nSum += ( nvalchar - 1 ) * nC
cconc := cconc +::aCode[ nvalchar ]
next
nSum := nSum%103 +1
cconc := cconc + ::aCode[ nSum ] +::aCode[107]
nSum := nSum % 103 + 1
cconc := cconc + ::aCode[ nSum ] +::aCode[ 107 ]
For n:=1 To Len(cconc) STEP 2
cBarCode +=Replicate('1', Val( Substr( cconc, n,1 ) ) )
cBarCode +=Replicate('0', Val( substr( cconc, n+1,1 ) ) )
For n := 1 To Len( cconc ) STEP 2
cBarCode += Replicate( '1', Val( Substr( cconc, n, 1 ) ) )
cBarCode += Replicate( '0', Val( substr( cconc, n + 1, 1 ) ) )
Next
::DrawSingleBar( cBarCode )
@@ -606,7 +606,7 @@ METHOD GenCodei25() CLASS TCode
LOCAL bc_string // := ::text
//LOCAL new_string := ""
If ( Len(::text) % 2 ) != 0
If ( Len( ::text ) % 2 ) != 0
::DrawError("Invalid barcode lenght")
lError := .T.
Endif
@@ -622,7 +622,7 @@ METHOD GenCodei25() CLASS TCode
///////////////////////////////////////////////////////////////////////////////////////////////
//Adding Start and Stop Pattern
::DrawSingleI25( ::acode[11] + bc_string + ::acode[12] )
::DrawSingleI25( ::acode[ 11 ] + bc_string + ::acode[ 12 ] )
::lastY := ::maxHeight
@@ -638,7 +638,7 @@ METHOD GenCodei25() CLASS TCode
/*
It makes mixe of the value to be codified by the Bar code I25
*/
METHOD MixCode(value) CLASS TCode
METHOD MixCode( value ) CLASS TCode
LOCAL l,i,k
LOCAL s
@@ -657,14 +657,14 @@ METHOD MixCode(value) CLASS TCode
DO While i < l
cFirst := ::Findcode( value[i] )
cnext := ::Findcode( value[i+1] )
cFirst := ::Findcode( value[ i ] )
cnext := ::Findcode( value[ i + 1 ] )
// Mix of the codes
// NNNNWNNWWW
// N N N W W
For k := 1 TO 5
s += cFirst[k] + cnext[k]
s += cFirst[ k ] + cnext[ k ]
Next
i += 2
@@ -682,7 +682,7 @@ METHOD Findcode( uval ) CLASS TCode
LOCAL npos
LOCAL cretc
npos := AScan( ::keys, { |x| x[1] == uval } )
cretc := ::acode[npos]
npos := AScan( ::keys, {| x | x[ 1 ] == uval } )
cretc := ::acode[ npos ]
Return cretc

View File

@@ -213,13 +213,13 @@ STATIC FUNCTION proc_shopping()
ORDSCOPE( 0, session["user"] )
ORDSCOPE( 1, session["user"] )
nT := 0
carts->( dbEval( { || nT += FIELD->TOTAL } ) )
carts->( dbEval( {|| nT += FIELD->TOTAL } ) )
dbSelectArea( "items" )
oW := UWBrowseNew( "br_item" )
oW:AddColumn( 101, "Item No.", "CODE" )
oW:AddColumn( 102, "Title", "TITLE" )
oW:AddColumn( 103, "Price", "PRICE" )
oW:AddColumn( 104, "", { || ULink( "Add to cart", "?add=" + RTrim( FIELD->CODE ) ) }, .T. )
oW:AddColumn( 104, "", {|| ULink( "Add to cart", "?add=" + RTrim( FIELD->CODE ) ) }, .T. )
oW:nPageSize := 10
IF HB_HHasKey( get, "_pos" )
oW:nPos := Val( get["_pos"] )
@@ -259,14 +259,14 @@ STATIC FUNCTION proc_cart()
ORDSCOPE( 0, session["user"] )
ORDSCOPE( 1, session["user"] )
nT := 0
carts->( dbEval( { || nT += FIELD->TOTAL } ) )
carts->( dbEval( {|| nT += FIELD->TOTAL } ) )
oW := UWBrowseNew( "br_cart" )
oW:AddColumn( 101, "Item No.", "CODE" )
oW:AddColumn( 102, "Title", { || items->( dbSeek( carts->CODE, .F. ), FIELD->TITLE ) } )
oW:AddColumn( 102, "Title", {|| items->( dbSeek( carts->CODE, .F. ), FIELD->TITLE ) } )
oW:AddColumn( 103, "Amount", "AMOUNT" )
oW:AddColumn( 104, "Total", "TOTAL" )
oW:AddColumn( 104, "", { || ULink( "Delete", "?del=" + RTrim( FIELD->CODE ) ) }, .T. )
oW:AddColumn( 104, "", {|| ULink( "Delete", "?del=" + RTrim( FIELD->CODE ) ) }, .T. )
oW:nPageSize := 10
IF HB_HHasKey( get, "_pos" )
oW:nPos := Val( get["_pos"] )

View File

@@ -4574,10 +4574,10 @@ METHOD AChoiceNew:init( nTop, nLft, nBtm, nRgt, acItems, xSelect, ;
::nAtTop := 1 // The number of the item at the top
::nAtBtm := 1 // The number of the item at the bottom
::nItems := 0 // The number of items
::bScan := { | cX | IF( left( cX, 1 ) == upper( chr( ::nKey ) ), .T., .F. ) }
::bScan := {| cX | IF( left( cX, 1 ) == upper( chr( ::nKey ) ), .T., .F. ) }
::lUserFunc := ( !empty( ::cUserFunc ) )
::nUserFunc := 0 // RETURN value FROM user FUNCTION
::bUserFunc := { || AC_ABORT } // Block form of user FUNCTION
::bUserFunc := {|| AC_ABORT } // Block form of user FUNCTION
::cLoClr := Before( ",", setcolor() )
::cHiClr := Before( ",", After( ",", setcolor() ) )
::cUnClr := After( ",", After( ",", After( ",", After( ",", setcolor() ) ) ) )
@@ -4601,7 +4601,7 @@ METHOD AChoiceNew:init( nTop, nLft, nBtm, nRgt, acItems, xSelect, ;
::nNumCols := ::nRight - ::nLeft + 1
::nNumRows := ::nBottom - ::nTop + 1
aeval( ::acItems, { | x | IF( valtype( x ) == "C", aadd( ::acCopy, padr( x, ::nNumCols ) ), .F. ) } )
aeval( ::acItems, {| x | IF( valtype( x ) == "C", aadd( ::acCopy, padr( x, ::nNumCols ) ), .F. ) } )
::nItems := len( ::acCopy )
::alSelect := array( ::nItems )

View File

@@ -180,7 +180,7 @@ FUNCTION hbide_execPopup( aPops, aqPos, qParent )
ENDIF
ENDIF
NEXT
ENDIF
ENDIF
ENDIF
qPop := NIL
HB_SYMBOL_UNUSED( xRet )
@@ -201,7 +201,7 @@ FUNCTION hbide_createTarget( cFile, txt_ )
LOCAL cNewLine := hb_eol()
IF hHandle != F_ERROR
aeval( txt_, { |e| fWrite( hHandle, e + cNewLine ) } )
aeval( txt_, {| e | fWrite( hHandle, e + cNewLine ) } )
fClose( hHandle )
ENDIF
@@ -374,7 +374,7 @@ FUNCTION hbide_readSource( cTxtFile )
FUNCTION hbide_evalAsString( cExp )
LOCAL cValue
BEGIN SEQUENCE WITH { || break() }
BEGIN SEQUENCE WITH {|| break() }
cValue := Eval( hb_macroBlock( cExp ) )
RECOVER
cValue := cExp
@@ -391,7 +391,7 @@ FUNCTION hbide_evalAsString( cExp )
FUNCTION hbide_evalAsIs( cExp )
LOCAL xValue
BEGIN SEQUENCE WITH { || break() }
BEGIN SEQUENCE WITH {|| break() }
xValue := Eval( hb_macroBlock( cExp ) )
RECOVER
xValue := cExp

View File

@@ -91,9 +91,9 @@ FUNCTION BrowseODBC( nTop, nLeft, nBottom, nRight, oDataSource )
oBrw := TBrowseNew( nTop + 2, nLeft + 1, nBottom - 1, nRight - 1 )
oBrw:SkipBlock := { | nRecs | Skipped( nRecs,oDataSource ) }
oBrw:GoTopBlock := { || oDataSource:first() }
oBrw:GoBottomBlock := { || oDataSource:last() }
oBrw:SkipBlock := {| nRecs | Skipped( nRecs, oDataSource ) }
oBrw:GoTopBlock := {|| oDataSource:first() }
oBrw:GoBottomBlock := {|| oDataSource:last() }
oBrw:HeadSep := "-"

View File

@@ -452,7 +452,7 @@ METHOD FieldByName( cField ) CLASS TODBC
LOCAL xRet := NIL
IF HB_ISSTRING( cField )
nRet := AScan( ::Fields, { | x | Upper( x:FieldName ) == Upper( cField ) } )
nRet := AScan( ::Fields, {| x | Upper( x:FieldName ) == Upper( cField ) } )
IF nRet != 0
xRet := ::Fields[ nRet ]

View File

@@ -2162,7 +2162,7 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods )
HB_SYMBOL_UNUSED( cMtdName )
/* check for methods already been worked on */
IF AScan( ::func_, { |e_ | e_[ 1 ] == oMtd:cFun } ) > 0
IF AScan( ::func_, {| e_ | e_[ 1 ] == oMtd:cFun } ) > 0
RETURN {}
ENDIF
AAdd( ::func_, { oMtd:cFun, 0, "" } )

View File

@@ -12,65 +12,67 @@
#include "hbqtgui.ch"
Procedure Main()
Local oWid
Local oLabel1
Local oLabel2
Local oLay1
PROCEDURE Main()
LOCAL oWid
LOCAL oLabel1
LOCAL oLabel2
LOCAL oLay1
oWid := QWidget()
oWid:setWindowTitle( 'Draggable window' )
oWid:setWindowTitle( "Draggable window" )
oWId:setAttribute( Qt_WA_TranslucentBackground )
oWid:setWindowFlags(Qt_FramelessWindowHint)
oWid:setWindowFlags( Qt_FramelessWindowHint )
oLabel1:= QLabel()
oLabel1:setPixmap( QPixmap( "harbour-logo.png" ) )
oLabel1 := QLabel()
oLabel1:setPixmap( QPixmap( hb_DirBase() + "harbour-logo.png" ) )
oLabel2:= QLabel( "Drag-me with the mouse. Double-click to close." )
oLabel2 := QLabel( "Drag-me with the mouse. Double-click to close." )
oLay1 := QVBoxLayout( oWid )
oLay1:addWidget( oLabel1 )
oLay1:addWidget( oLabel2 )
oWid:connect( QEvent_MouseButtonPress , {|oMouseEvent| WinDrag( oMouseEvent, oWid ) } )
oWid:connect( QEvent_MouseButtonRelease, {|oMouseEvent| WinDrag( oMouseEvent, oWid ) } )
oWid:connect( QEvent_MouseMove, {|oMouseEvent| WinDrag( oMouseEvent, oWid ) } )
oWid:connect( QEvent_MouseButtonPress , {| oMouseEvent | WinDrag( oMouseEvent, oWid ) } )
oWid:connect( QEvent_MouseButtonRelease, {| oMouseEvent | WinDrag( oMouseEvent, oWid ) } )
oWid:connect( QEvent_MouseMove, {| oMouseEvent | WinDrag( oMouseEvent, oWid ) } )
oWid:connect( QEvent_MouseButtonDblClick, {|| oWid:close() } )
oWid:show()
QApplication():exec()
Return
RETURN
PROCEDURE WinDrag( oMouseEvent, oWid )
Procedure WinDrag( oMouseEvent, oWid )
Static nXOffset
Static nYOffset
Static lOnMove := .F.
Local nType
STATIC s_nXOffset
STATIC s_nYOffset
STATIC s_lOnMove := .F.
nType := oMouseEvent:type()
LOCAL nType
If lOnMove .and. ( nType == QEvent_MouseMove )
oWid:move( oMouseEvent:globalX() - nXOffset, oMouseEvent:globalY() - nYOffset )
nType := oMouseEvent:Type()
IF s_lOnMove .AND. nType == QEvent_MouseMove
oWid:move( oMouseEvent:globalX() - s_nXOffset, oMouseEvent:globalY() - s_nYOffset )
oMouseEvent:accept()
ElseIf ( nType == QEvent_MouseButtonPress .and. oMouseEvent:button() == Qt_LeftButton )
nXOffset := oMouseEvent:globalX() - oWid:x()
nYOffset := oMouseEvent:globalY() - oWid:y()
lOnMove := .T.
ELSEIF nType == QEvent_MouseButtonPress .AND. oMouseEvent:button() == Qt_LeftButton
s_nXOffset := oMouseEvent:globalX() - oWid:x()
s_nYOffset := oMouseEvent:globalY() - oWid:y()
s_lOnMove := .T.
QApplication():setOverrideCursor( QCursor( Qt_ClosedHandCursor ) )
oMouseEvent:accept()
ElseIf ( nType == QEvent_MouseButtonRelease .and. oMouseEvent:button() == Qt_LeftButton )
lOnMove := .F.
ELSEIF nType == QEvent_MouseButtonRelease .AND. oMouseEvent:button() == Qt_LeftButton
s_lOnMove := .F.
QApplication():restoreOverrideCursor()
oMouseEvent:accept()
Else
ELSE
oMouseEvent:ignore()
EndIf
Return
ENDIF
RETURN

View File

@@ -255,9 +255,9 @@ PROCEDURE thFunc()
oBrowse:ColSep := " ³ "
oBrowse:HeadSep := "ÄÂÄ"
oBrowse:GoTopBlock := { || dbGoTop() }
oBrowse:GoBottomBlock := { || dbGoBottom() }
oBrowse:SkipBlock := { | nSkip | dbSkipBlock( nSkip, oBrowse ) }
oBrowse:GoTopBlock := {|| dbGoTop() }
oBrowse:GoBottomBlock := {|| dbGoBottom() }
oBrowse:SkipBlock := {| nSkip | dbSkipBlock( nSkip, oBrowse ) }
for i := 1 to len( aStruct )
oBrowse:AddColumn( TBColumnNew( aStruct[ i,1 ], BlockField( i ) ) )
@@ -374,4 +374,3 @@ STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd )
RETURN lRet
//-------------------------------------------------------------------//

View File

@@ -12,7 +12,7 @@ PROCEDURE Main()
? hb_ValToExp( oMeta:getTables() )
IF AScan( oMeta:getTables(), { | a | "test" == a[ 3 ] } ) > 0
IF AScan( oMeta:getTables(), {| a | "test" == a[ 3 ] } ) > 0
? "test table already exist let's drop it"
oStmt := oConn:createStatement()
oStmt:executeUpdate( "DROP TABLE test" )

View File

@@ -57,17 +57,17 @@ PROCEDURE MAIN( cUrl, cFile )
SET COLOR TO w +/ b
CLEAR SCREEN
@1, 6 SAY "X H A R B O U R - TIP (class based internet client protocol) test"
@ 1, 6 SAY "X H A R B O U R - TIP (class based internet client protocol) test"
IF Empty( cUrl )
@4, 5 SAY "USAGE: tipTest <URI> [dumpToOrFromFileName]"
@ 4, 5 SAY "USAGE: tipTest <URI> [dumpToOrFromFileName]"
Terminate()
ENDIF
oUrl := tURL():New( cUrl )
IF Empty( oUrl )
@4, 5 SAY "Invalid url " + cUrl
@ 4, 5 SAY "Invalid url " + cUrl
Terminate()
ENDIF
@@ -87,7 +87,7 @@ PROCEDURE MAIN( cUrl, cFile )
ENDCASE
IF Empty( oClient )
@4, 5 SAY "Invalid url " + cUrl
@ 4, 5 SAY "Invalid url " + cUrl
Terminate()
ENDIF
oClient:nConnTimeout := 2000 /* := 20000 */
@@ -95,12 +95,12 @@ PROCEDURE MAIN( cUrl, cFile )
oUrl:cUserid := StrTran( oUrl:cUserid, "&at;", "@" )
@4, 5 SAY "Connecting to " + oUrl:cProto + "://" + oUrl:cServer
@ 4, 5 SAY "Connecting to " + oUrl:cProto + "://" + oUrl:cServer
IF oClient:Open()
IF Empty( oClient:cReply )
@5, 5 SAY "Connection status: <connected>"
@ 5, 5 SAY "Connection status: <connected>"
ELSE
@5, 5 SAY "Connection status: " + oClient:cReply
@ 5, 5 SAY "Connection status: " + oClient:cReply
ENDIF
IF ! Empty( cFile ) .AND. Left( cFile, 1 ) == '+'
@@ -109,44 +109,44 @@ PROCEDURE MAIN( cUrl, cFile )
ENDIF
IF oClient:nAccessMode == TIP_WO .OR. ( oClient:nAccessMode == TIP_RW .AND. bWrite )
oClient:exGauge := { | done, size| ShowGauge( done, size ) }
oClient:exGauge := {| done, size | ShowGauge( done, size ) }
/* Can be also:
oClient:exGauge := {| done, size, oConnection | dothing( done, size, oConnection) }
oClient:exGauge := {| done, size, oConnection | dothing( done, size, oConnection ) }
*/
IF oClient:WriteFromFile( cFile )
@7, 5 SAY "Data sucessfully sent"
@ 7, 5 SAY "Data sucessfully sent"
ELSE
@7, 5 SAY "ERROR: Data not sent " + oClient:lastErrorMessage()
@ 7, 5 SAY "ERROR: Data not sent " + oClient:lastErrorMessage()
ENDIF
ELSE
IF Empty( cFile )
cData := oClient:Read()
IF ! Empty( cData )
@7, 5 SAY "First 80 characters:"
@ 7, 5 SAY "First 80 characters:"
? Trim( SubStr( cData, 1, 80 ) )
ELSE
@7, 5 SAY "ERROR - file can't be retrieved " + oClient:lastErrorMessage()
@ 7, 5 SAY "ERROR - file can't be retrieved " + oClient:lastErrorMessage()
ENDIF
ELSE
IF oClient:ReadToFile( cFile )
@7, 5 SAY "File " + cFile + " written."
@8, 5 SAY "Server replied " + oClient:cReply
@ 7, 5 SAY "File " + cFile + " written."
@ 8, 5 SAY "Server replied " + oClient:cReply
ELSE
@7, 5 SAY "Generic error in writing." + cFile
@ 7, 5 SAY "Generic error in writing." + cFile
ENDIF
ENDIF
ENDIF
oClient:Close()
IF Empty( oClient:cReply )
@22, 5 SAY "Done: (no goodbye message)"
@ 22, 5 SAY "Done: (no goodbye message)"
ELSE
@22, 5 SAY "Done: " + oClient:cReply
@ 22, 5 SAY "Done: " + oClient:cReply
ENDIF
ELSE
@5, 5 SAY "Can't open URI " + cUrl
@ 5, 5 SAY "Can't open URI " + cUrl
IF ! Empty( oClient:cReply )
@6, 5 SAY oClient:cReply
@ 6, 5 SAY oClient:cReply
ENDIF
ENDIF
@@ -156,9 +156,9 @@ PROCEDURE MAIN( cUrl, cFile )
PROCEDURE Terminate()
@23, 18 SAY "Program done - Press a key to terminate"
@ 23, 18 SAY "Program done - Press a key to terminate"
Inkey( 0 )
@24, 0
@ 24, 0
QUIT
RETURN
@@ -168,7 +168,7 @@ PROCEDURE ShowGauge( nSent, nSize )
@6, 5 SAY "Sending: " + Replicate( Chr( 176 ), 60 )
/* nSent may be zero */
IF nSent > 0
@6, 14 SAY Replicate( Chr( 219 ), 60 * nSent/nSize )
@ 6, 14 SAY Replicate( Chr( 219 ), 60 * nSent / nSize )
ENDIF
RETURN

View File

@@ -430,7 +430,7 @@ METHOD Next() CLASS THtmlIterator
LOCAL oFound, lExit := .F.
DO WHILE ! lExit
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
oFound := ::aNodes[ ++::nCurrent ]
IF ::MatchCriteria( oFound )
::oNode := oFound
@@ -483,7 +483,7 @@ METHOD MatchCriteria( oFound ) CLASS THtmlIteratorScan
IF ::cValue != NIL
xData := oFound:getAttributes()
IF hb_HScan( xData, { | xKey, cValue | HB_SYMBOL_UNUSED( xKey ), Lower( ::cValue ) == Lower( cValue ) } ) == 0
IF hb_HScan( xData, {| xKey, cValue | HB_SYMBOL_UNUSED( xKey ), Lower( ::cValue ) == Lower( cValue ) } ) == 0
RETURN .F.
ENDIF
ENDIF
@@ -525,12 +525,12 @@ METHOD MatchCriteria( oFound ) CLASS THtmlIteratorRegex
ENDIF
IF ::cAttribute != NIL .AND. ;
hb_HScan( oFound:getAttributes(), { | cKey | hb_regexLike( Lower( ::cAttribute ), cKey ) } ) == 0
hb_HScan( oFound:getAttributes(), {| cKey | hb_regexLike( Lower( ::cAttribute ), cKey ) } ) == 0
RETURN .F.
ENDIF
IF ::cValue != NIL .AND. ;
hb_HScan( oFound:getAttributes(), { | xKey, cValue | HB_SYMBOL_UNUSED( xKey ), hb_regexLike( ::cValue, cValue ) } ) == 0
hb_HScan( oFound:getAttributes(), {| xKey, cValue | HB_SYMBOL_UNUSED( xKey ), hb_regexLike( ::cValue, cValue ) } ) == 0
RETURN .F.
ENDIF
@@ -678,7 +678,7 @@ METHOD isType( nType ) CLASS THtmlNode
LOCAL lRet
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
lRet := hb_bitAnd( ::htmlTagType[ 2 ], nType ) > 0
RECOVER
lRet := .F.
@@ -1065,14 +1065,14 @@ METHOD nextNode() CLASS THtmlNode
RETURN ::htmlContent[ 1 ]
ENDIF
nPos := AScan( ::parent:htmlContent, { | o | o == Self } )
nPos := AScan( ::parent:htmlContent, {| o | o == Self } )
IF nPos < Len( ::parent:htmlContent )
RETURN ::parent:htmlContent[ nPos + 1 ]
ENDIF
aNodes := ::parent:parent:collect()
nPos := AScan( aNodes, { | o | o == Self } )
nPos := AScan( aNodes, {| o | o == Self } )
RETURN iif( nPos == Len( aNodes ), NIL, aNodes[ nPos + 1 ] )
@@ -1087,7 +1087,7 @@ METHOD prevNode() CLASS THtmlNode
ENDIF
aNodes := ::parent:collect( Self )
nPos := AScan( aNodes, { | o | o == Self } )
nPos := AScan( aNodes, {| o | o == Self } )
RETURN iif( nPos == 1, ::parent, aNodes[ nPos - 1 ] )
@@ -1163,14 +1163,14 @@ METHOD attrToString() CLASS THtmlNode
ELSE
// attributes are parsed into a Hash
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
aAttr := ::htmlTagType[ 1 ]:exec()
RECOVER
// Tag has no attributes
aAttr := {}
END SEQUENCE
cAttr := ""
hb_HEval( ::htmlAttributes, { | cKey, cValue | cAttr += __AttrToStr( cKey, cValue, aAttr, Self ) } )
hb_HEval( ::htmlAttributes, {| cKey, cValue | cAttr += __AttrToStr( cKey, cValue, aAttr, Self ) } )
ENDIF
RETURN cAttr
@@ -1179,7 +1179,7 @@ STATIC FUNCTION __AttrToStr( cName, cValue, aAttr, oTHtmlNode )
LOCAL nPos
IF ( nPos := AScan( aAttr, { | a | a[ 1 ] == Lower( cName ) } ) ) == 0
IF ( nPos := AScan( aAttr, {| a | a[ 1 ] == Lower( cName ) } ) ) == 0
// Tag doesn't have this attribute
RETURN oTHtmlNode:error( "Invalid HTML attribute for: <" + oTHtmlNode:htmlTagName + ">", oTHtmlNode:className(), cName, EG_ARG, { cName, cValue } )
ENDIF
@@ -1241,7 +1241,7 @@ METHOD getText( cEOL ) CLASS THtmlNode
FOR EACH oNode IN ::htmlContent
cText += oNode:getText( cEOL )
IF Lower( ::htmlTagName ) $ "td,th" .AND. AScan( ::parent:htmlContent, { | o | o == Self } ) < Len( ::parent:htmlContent )
IF Lower( ::htmlTagName ) $ "td,th" .AND. AScan( ::parent:htmlContent, {| o | o == Self } ) < Len( ::parent:htmlContent )
// leave table rows in one line, cells separated by Tab
cText := SubStr( cText, 1, Len( cText ) - Len( cEol ) )
cText += Chr( 9 )
@@ -1261,7 +1261,7 @@ METHOD getAttribute( cName ) CLASS THtmlNode
RETURN hHash
ENDIF
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
cValue := hHash[ cName ]
RECOVER
cValue := NIL
@@ -1408,14 +1408,14 @@ METHOD setAttribute( cName, cValue ) CLASS THtmlNode
RETURN ::error( "Invalid HTML attribute for: <" + ::htmlTagName + ">", ::className(), cName, EG_ARG, { cName, cValue } )
ENDIF
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
aAttr := ::htmlTagType[ 1 ]:exec()
RECOVER
// Tag has no attributes
aAttr := {}
END SEQUENCE
IF ( nPos := AScan( aAttr, { | a | a[ 1 ] == Lower( cName ) } ) ) == 0
IF ( nPos := AScan( aAttr, {| a | a[ 1 ] == Lower( cName ) } ) ) == 0
// Tag doesn't have this attribute
RETURN ::error( "Invalid HTML attribute for: <" + ::htmlTagName + ">", ::className(), cName, EG_ARG, { cName, cValue } )
ENDIF
@@ -1445,7 +1445,7 @@ METHOD delAttribute( cName ) CLASS THtmlNode
LOCAL lRet := .F.
IF xVal != NIL
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
hb_HDel( ::htmlAttributes, cName )
lRet := .T.
RECOVER
@@ -1469,7 +1469,7 @@ METHOD isAttribute( cName ) CLASS THtmlNode
LOCAL lRet
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
lRet := hb_HHasKey( ::getAttributes(), cName )
RECOVER
lRet := .F.
@@ -1700,7 +1700,7 @@ FUNCTION THtmlTagType( cTagName )
THtmlInit()
ENDIF
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
aType := t_hTagTypes[ cTagName ]
RECOVER
aType := t_hTagTypes[ "_text_" ]
@@ -1716,11 +1716,11 @@ FUNCTION THtmlIsValid( cTagName, cAttrName )
THtmlInit()
ENDIF
BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
aValue := t_hTagTypes[ cTagName ]
IF cAttrName != NIL
aValue := aValue[ 1 ]:exec()
lRet := ( AScan( aValue, { | a | Lower( a[ 1 ] ) == Lower( cAttrName ) } ) > 0 )
lRet := ( AScan( aValue, {| a | Lower( a[ 1 ] ) == Lower( cAttrName ) } ) > 0 )
ENDIF
RECOVER
lRet := .F.

View File

@@ -125,7 +125,7 @@ ENDCLASS
METHOD Eval( cMethodName, ... ) CLASS OleNetioSrv
LOCAL xRetVal, oErr
BEGIN SEQUENCE WITH { |oErr| BREAK( oErr ) }
BEGIN SEQUENCE WITH {| oErr | BREAK( oErr ) }
SWITCH cMethodName
CASE "CONNECT"
xRetVal := !Empty( ::pConn := NETIO_GETCONNECTION( ... ) )

View File

@@ -33,13 +33,13 @@ METHOD Init( hWnd, cProgId, nTop, nLeft, nWidth, nHeight, cID ) CLASS HActiveX
win_AxInit()
::hWnd := WAPI_CreateWindowEX( 0, "AtlAxWin", cProgId, nStyle, nLeft, nTop, nWidth, nHeight, hWnd, 0 )
/* WAPI_SetWindowPos( ::hWnd, WIN_HWND_TOPMOST, 0, 0, 1, 1, hb_bitOr( WIN_SWP_NOSIZE, WIN_SWP_DRAWFRAME ) ) */
::oOLE := WIN_AxGetControl( ::hWnd, { | event, ... | ::Event( event, ... ) }, cID )
::oOLE := WIN_AxGetControl( ::hWnd, {| event, ... | ::Event( event, ... ) }, cID )
RETURN self
PROCEDURE Event( ... ) CLASS HActiveX
LOCAL cEvents := ""
LOCAL aEvents := { ... }
aEval( aEvents, { | xEvent | cEvents += HB_ValToStr( xEvent ) + ", " } )
aEval( aEvents, {| xEvent | cEvents += HB_ValToStr( xEvent ) + ", " } )
wapi_OutputDebugString( cEvents )
RETURN

View File

@@ -59,8 +59,8 @@ FUNCTION xpp_TBrowseDB( nTop, nLeft, nBottom, nRight )
LOCAL oBrowse := TBrowseNew( nTop, nLeft, nBottom, nRight )
oBrowse:SkipBlock := { | nRecs | DbSkipper( nRecs ) }
oBrowse:GoTopBlock := { || dbGoTop() }
oBrowse:GoBottomBlock := { || dbGoBottom() }
oBrowse:SkipBlock := {| nRecs | DbSkipper( nRecs ) }
oBrowse:GoTopBlock := {|| dbGoTop() }
oBrowse:GoBottomBlock := {|| dbGoBottom() }
RETURN oBrowse

View File

@@ -207,7 +207,7 @@ METHOD start( xAction, ... ) CLASS THREAD
ELSE
::pThreadID := hb_threadStart( HB_THREAD_INHERIT_PUBLIC, ;
{ |...|
{| ... |
LOCAL nTime
ThreadObject( Self )

View File

@@ -87,7 +87,7 @@ FUNCTION __ActiveStructure( cStructure, nAlign )
IF PCount() == 2
cStructure := Upper( cStructure )
IF aScan( s_aClasses, { | aClassInfo | aClassInfo[1] == cStructure } ) > 0
IF aScan( s_aClasses, {| aClassInfo | aClassInfo[1] == cStructure } ) > 0
/* In most cases we can simply ignore the reduefinition, by returning a FAKED Structure Array!
oErr := ErrorNew()
oErr:Args := { cStructure, nAlign }
@@ -182,7 +182,7 @@ FUNCTION HB_CStructureID( cStructure, lInplace )
cStructure := Upper( cStructure )
nID := aScan( s_aClasses, { | aClassInfo | aClassInfo[1] == cStructure } )
nID := aScan( s_aClasses, {| aClassInfo | aClassInfo[1] == cStructure } )
IF nID == 0
nID := aScan( s_aSynonyms, {|aSynonym| aSynonym[1] == cStructure } )
@@ -313,7 +313,7 @@ FUNCTION HB_CStructure( cStructure, nAlign )
LOCAL oErr
cStructure := Upper( cStructure )
nID := aScan( s_aClasses, { | aClassInfo | aClassInfo[1] == cStructure } )
nID := aScan( s_aClasses, {| aClassInfo | aClassInfo[1] == cStructure } )
IF nID == 0
oErr := ErrorNew()
@@ -403,7 +403,7 @@ FUNCTION HB_CTypeArrayID( CType, nLen )
LOCAL aCTypes, acMembers, cMember
LOCAL cArrayClassName := "C Array of [" + LTrim( Str( nLen ) ) + "] CType: " + Str( CType )
nID := aScan( s_aArrayClasses, { | aArrayDefinitions | aArrayDefinitions[1] == CType .AND. aArrayDefinitions[2] == nLen } )
nID := aScan( s_aArrayClasses, {| aArrayDefinitions | aArrayDefinitions[1] == CType .AND. aArrayDefinitions[2] == nLen } )
IF nID == 0
hClass := __clsNew( "C Structure " + cArrayClassName, nLen + CLASS_PROPERTIES )

View File

@@ -70,6 +70,8 @@
* [druzus]
*/
#include "directry.ch"
FUNCTION DirectoryRecurse( cPath, cAttr )
LOCAL aResult
@@ -87,6 +89,6 @@ FUNCTION DirectoryRecurse( cPath, cAttr )
aResult := HB_DirScan( cFilePath, cMask + cExt, ;
StrTran( Upper( cAttr ), "D" ) )
AEval( aResult, { |x| x[ 1 ] := cFilePath + x[ 1 ] } )
AEval( aResult, {| x | x[ F_NAME ] := cFilePath + x[ F_NAME ] } )
RETURN aResult

View File

@@ -378,7 +378,7 @@ STATIC FUNCTION __objGetMsgFullList( oObject, lData, nRange, nScope, nNoScope )
aMessages := ASort( oObject:ClassSel( nRange, nScope, .T. ),,, {|x,y| x[HB_OO_DATA_SYMBOL] < y[HB_OO_DATA_SYMBOL] } )
aReturn := {}
nFirstProperty := aScan( aMessages, { | aElement | Left( aElement[HB_OO_DATA_SYMBOL], 1 ) == '_' } )
nFirstProperty := aScan( aMessages, {| aElement | Left( aElement[HB_OO_DATA_SYMBOL], 1 ) == '_' } )
FOR EACH aMsg IN aMessages
@@ -386,7 +386,7 @@ STATIC FUNCTION __objGetMsgFullList( oObject, lData, nRange, nScope, nNoScope )
LOOP
ENDIF
IF ( AScan( aMessages, { | aElement | aElement[HB_OO_DATA_SYMBOL] == "_" + aMsg[HB_OO_DATA_SYMBOL] }, nFirstProperty ) != 0 ) == lData
IF ( AScan( aMessages, {| aElement | aElement[HB_OO_DATA_SYMBOL] == "_" + aMsg[HB_OO_DATA_SYMBOL] }, nFirstProperty ) != 0 ) == lData
IF nNoScope == 0 .OR. HB_BITAND( aMsg[HB_OO_DATA_SCOPE], nNoScope ) == 0
AAdd( aReturn, aMsg )
ENDIF

View File

@@ -293,7 +293,7 @@ METHOD Put( cFile ) CLASS TJsList
::nH := Fcreate( cFile )
ENDIF
Aeval( ::aScript, { | e | Fwrite( ::nH, e ) } )
Aeval( ::aScript, {| e | Fwrite( ::nH, e ) } )
Fclose( ::nH )

View File

@@ -209,7 +209,7 @@ METHOD Field( cQueryName ) CLASS TCgi
DEFAULT cQueryName TO ""
nRet := Ascan( ::aQueryFields, ;
{ | x | Upper( x[ 1 ] ) == Upper( cQueryName ) } )
{| x | Upper( x[ 1 ] ) == Upper( cQueryName ) } )
IF nRet > 0
cRet := ::aQueryFields[ nRet, 2 ]

View File

@@ -491,7 +491,7 @@ CLASS THtmlForm
METHOD AddControl( o ) INLINE IIF( HB_ISOBJECT( o ), ( o:nH := ::nH, o:Form := Self ), ),;
Aadd( ::aControls, o )
METHOD PutControls() INLINE Aeval( ::aControls, { | e | e:Put() } )
METHOD PutControls() INLINE Aeval( ::aControls, {| e | e:Put() } )
METHOD New( cName, cAction, cMethod, lFrame, cCaption, nWidth )
@@ -681,7 +681,7 @@ METHOD Put( lPutControls ) CLASS THtmlForm
// Fwrite( ::nH, ::cOutput )
::oHtm:cStr += ::cOutput
IF lPutControls
Aeval( ::aControls, { | e | IIF( HB_ISOBJECT( e ), ;
Aeval( ::aControls, {| e | IIF( HB_ISOBJECT( e ), ;
e:Put(), ::oHtm:cStr += e ) } )
ENDIF
@@ -717,7 +717,7 @@ RETURN Self
METHOD GetControl( cName ) CLASS THtmlForm
LOCAL oRet
LOCAL nPos := Ascan( ::aControls, { | e | e:name == cName } )
LOCAL nPos := Ascan( ::aControls, {| e | e:name == cName } )
IF nPos > 0
oRet := ::aControls[ nPos ]

View File

@@ -370,7 +370,7 @@ METHOD New( cTitle, cLinkTitle, cCharSet, aScriptSRC, ;
ENDIF
IF aJsCode != NIL
Aeval( aJsCode, { | e | HtmlJsCmd( ::nH, e ) } )
Aeval( aJsCode, {| e | HtmlJsCmd( ::nH, e ) } )
ENDIF
IF aScriptSrc != NIL

View File

@@ -166,15 +166,15 @@ FUNCTION NetLock( nType, lReleaseLocks, nSeconds )
SWITCH nType
CASE NET_RECLOCK // 1 = Record Lock...
xIdentifier := IF( lReleaseLocks, NIL, RECNO() )
bOperation := { | x | DBRLOCK( x ) }
xIdentifier := IIF( lReleaseLocks, NIL, RECNO() )
bOperation := {| x | DBRLOCK( x ) }
exit
CASE NET_FILELOCK // 2 = File Lock...
bOperation := { || FLOCK() }
bOperation := {|| FLOCK() }
exit
CASE NET_APPEND // 3 = Append Blank...
xIdentifier := lReleaseLocks
bOperation := { | x | DBAPPEND( x ), !NETERR() }
bOperation := {| x | DBAPPEND( x ), !NETERR() }
exit
ENDSWITCH
@@ -416,7 +416,7 @@ RETURN n
FUNCTION IsLocked( nRecId )
DEFAULT nRecID TO recno()
RETURN ASCAN( DBRLOCKLIST(), { | n | n == nRecID } ) > 0
RETURN ASCAN( DBRLOCKLIST(), {| n | n == nRecID } ) > 0
FUNCTION NetError()
@@ -465,7 +465,7 @@ FUNCTION TableNew( cDBF, cALIAS, cOrderBag, cDRIVER, ;
lAuto := SET( _SET_AUTOPEN, .F. )
IF ( nPos := ASCAN( saTables, { | e | e[ 1 ] == UPPER( cALIAS ) } ) ) > 0
IF ( nPos := ASCAN( saTables, {| e | e[ 1 ] == UPPER( cALIAS ) } ) ) > 0
oDB := saTables[ nPos, 2 ]
@@ -489,7 +489,7 @@ FUNCTION GetTable( cAlias )
LOCAL nPos
LOCAL oDB
IF ( nPos := ASCAN( saTables, { | e | e[ 1 ] == UPPER( cALIAS ) } ) ) > 0
IF ( nPos := ASCAN( saTables, {| e | e[ 1 ] == UPPER( cALIAS ) } ) ) > 0
oDB := saTables[ nPos, 2 ]
ENDIF
RETURN oDB
@@ -1034,7 +1034,7 @@ METHOD Write( lKeepBuffer ) CLASS HBTable
( ::Alias )->( ORDSETFOCUS( 0 ) )
FOR i := 1 TO ( ::Alias )->( FCOUNT() )
n := ASCAN( adata, { | a | a[ 1 ] == ( ::Alias )->( FIELDNAME( i ) ) } )
n := ASCAN( adata, {| a | a[ 1 ] == ( ::Alias )->( FIELDNAME( i ) ) } )
( ::Alias )->( FIELDPUT( i, adata[ n, 2 ] ) )
NEXT
@@ -1296,7 +1296,7 @@ METHOD Reindex() CLASS HBTable
RETURN .F.
ENDIF
AEVAL( ::aOrders, { | o | o:Create() } )
AEVAL( ::aOrders, {| o | o:Create() } )
::Kill()
::IsNet := .T.
@@ -1363,7 +1363,7 @@ METHOD GetOrder( xOrder ) CLASS HBTable
LOCAL xType := VALTYPE( xOrder )
IF xType == "C"
nPos := ASCAN( ::aOrders, { | e | e:Tag == xOrder } )
nPos := ASCAN( ::aOrders, {| e | e:Tag == xOrder } )
ELSEIF xType == "N" .and. xOrder > 0
nPos := xOrder
ELSE
@@ -1405,7 +1405,7 @@ METHOD GetOrderLabels() CLASS HBTable
LOCAL aRet := {}
IF !EMPTY( ::aOrders )
AEVAL( ::aOrders, { | e | AADD( aRet, e:Label ) } )
AEVAL( ::aOrders, {| e | AADD( aRet, e:Label ) } )
ENDIF
RETURN aRet
@@ -1523,7 +1523,7 @@ METHOD New( cTag, cKey, cLabel, cFor, cWhile, lUnique, bEval, nInterval, cOrderB
DEFAULT lUnique TO .F.
DEFAULT cFor TO ".T."
DEFAULT cWhile TO ".T."
DEFAULT bEval TO { || .T. }
DEFAULT bEval TO {|| .T. }
DEFAULT nInterval TO 1
DEFAULT cLabel TO cTag
::cOrderBag := cOrderBag

View File

@@ -270,7 +270,7 @@ FUNCTION ValToBlock( xVal )
RETURN xVal
ENDIF
RETURN { || xVal }
RETURN {|| xVal }
//--------------------------------------------------------------//
FUNCTION ValToCharacter( xVal )

View File

@@ -100,7 +100,7 @@
[SCOPE <scope>] [<persist: PERSISTENT>] ;
[<case: NOUPPER>] => ;
__clsAddMsg( <Class>():classH, #<Message>, ;
{ |Self| HB_SYMBOL_UNUSED(Self), <code> }, ;
{| Self | HB_SYMBOL_UNUSED( Self ), <code> }, ;
HB_OO_MSG_INLINE, NIL, ;
__xhb_cls_scope( <scope>, <.persist.> ) )
@@ -110,7 +110,7 @@
[SCOPE <scope>] [<persist: PERSISTENT>] ;
[<case: NOUPPER>] => ;
__clsAddMsg( <Class>():classH, #<Message>, ;
{ |Self, <params>| HB_SYMBOL_UNUSED(Self), <code> }, ;
{| Self, <params> | HB_SYMBOL_UNUSED( Self ), <code> }, ;
HB_OO_MSG_INLINE, NIL, ;
__xhb_cls_scope( <scope>, <.persist.> ) )

View File

@@ -91,7 +91,7 @@ FUNCTION xhb_ErrorLog( cErrorLog, lErrorLogAppend )
RETURN aValueOld
PROCEDURE xhb_ErrorSys()
ErrorBlock( { | oError | xhb_DefError( oError ) } )
ErrorBlock( {| oError | xhb_DefError( oError ) } )
RETURN
STATIC FUNCTION err_ModuleName( oError, n )
@@ -475,7 +475,7 @@ STATIC FUNCTION LogError( oerr )
ENDIF
FWriteLine( nHandle, "" )
HB_WAEval( { ||
HB_WAEval( {||
IF __dynsIsFun( "Select" )
FWriteLine( nHandle, "Work Area No ......: " + strvalue( &("Select()") ) )
ENDIF

View File

@@ -78,7 +78,7 @@ FUNCTION CreateOLEObject()
#define EG_OLEEXCEPTION 1001
#define DISPID_VALUE 0
STATIC s_bBreak := { | oError | Break( oError ) }
STATIC s_bBreak := {| oError | Break( oError ) }
STATIC FUNCTION s_oleOpError( cOperator, ... )
STATIC s_hErrCode := { "==" => 1070, ;

View File

@@ -2,7 +2,7 @@
* $Id$
*/
/* $Id$
/*
* Harbour Project source code:
* Editor Class (base for Memoedit(), debugger, etc.)
*
@@ -161,8 +161,8 @@
// Class DATA can be faster, but since the user can change directly
// READINSERT(), ::lInsert must check in it.
// DATA lInsert INIT .F. // Is editor in Insert mode or in Overstrike one? Default : Overstrike - Clipper
METHOD lInsert() BLOCK { | | Set( _SET_INSERT ) }
METHOD _lInsert( lInsert ) BLOCK { | Self, lInsert | HB_SYMBOL_UNUSED( Self ), iif( HB_ISLOGICAL( lInsert ), Set( _SET_INSERT, lInsert ), Set( _SET_INSERT ) ) }
METHOD lInsert() BLOCK {|| Set( _SET_INSERT ) }
METHOD _lInsert( lInsert ) BLOCK {| Self, lInsert | HB_SYMBOL_UNUSED( Self ), iif( HB_ISLOGICAL( lInsert ), Set( _SET_INSERT, lInsert ), Set( _SET_INSERT ) ) }
METHOD New( cString, nTop, nLeft, nBottom, ; // Converts a string to an array of strings splitting input string at EOL boundaries
nRight, lEditMode, nLineLength, nTabSize, nTextRow, nTextCol, nWndRow, nWndCol )
@@ -2438,9 +2438,9 @@ METHOD GetText( lSoftCr ) CLASS XHBEditor
ENDIF
IF ::lWordWrap
AEval( ::aText, { | cItem | cString += cItem:cText + iif( cItem:lSoftCR, cSoft, cEOL ) }, , ::LastRow() - 1 )
AEval( ::aText, {| cItem | cString += cItem:cText + iif( cItem:lSoftCR, cSoft, cEOL ) }, , ::LastRow() - 1 )
ELSE
AEval( ::aText, { | cItem | cString += cItem:cText + cEOL }, , ::LastRow() - 1 )
AEval( ::aText, {| cItem | cString += cItem:cText + cEOL }, , ::LastRow() - 1 )
ENDIF
// Last line does not need a cEOL delimiter

View File

@@ -60,9 +60,9 @@ PRIVATE foo, bar
EVAL( bar )
PROCEDURE Test()
LOCAL a:='FOO', b:='BAR'
LOCAL a := "FOO", b := "BAR"
foo ={ || a + ( bar:=EVAL( {|| b} ) ) }
foo := {|| a + ( bar := EVAL( {|| b } ) ) }
RETURN

View File

@@ -307,7 +307,7 @@
* DATA hWnd, nOldProc
* METHOD New( ) CONSTRUCTOR
* METHOD Capture() INLINE SetCapture( ::hWnd )
* METHOD End() BLOCK { | Self, lEnd | If( lEnd := ::lValid(),;
* METHOD End() BLOCK {| Self, lEnd | If( lEnd := ::lValid(),;
* ::PostMsg( WM_CLOSE ),), lEnd }
* METHOD EraseBkGnd( hDC )
* METHOD cTitle( cNewTitle ) SETGET

View File

@@ -403,7 +403,7 @@
* $EXAMPLES$
* // create a new THappy class and add a Smile INLINE method
* oHappy := HBClass():New( "THappy" )
* bInline := { | nType | { ":)", ";)", "*SMILE*" }[ nType ] }
* bInline := {| nType | { ":)", ";)", "*SMILE*" }[ nType ] }
* __objAddInline( oHappy, "Smile", bInline )
* ? oHappy:Smile( 1 ) // :)
* ? oHappy:Smile( 2 ) // ;)
@@ -564,8 +564,8 @@
* $EXAMPLES$
* // create a new THappy class and add a Smile INLINE method
* oHappy := HBClass():New( "THappy" )
* bMyInline := { | nType | { ":)", ";)" }[ nType ] }
* bYourInline := { | nType | { "*SMILE*", "*WINK*" }[ nType ] }
* bMyInline := {| nType | { ":)", ";)" }[ nType ] }
* bYourInline := {| nType | { "*SMILE*", "*WINK*" }[ nType ] }
* __objAddInline( oHappy, "Smile", bMyInline )
* ? oHappy:Smile( 1 ) // :)
* ? oHappy:Smile( 2 ) // ;)

View File

@@ -54,7 +54,7 @@
#define HB_PERS_CH_
#xcommand OBJECT <obj> AS <ClassName> => ;
Self := hb_SetObject( Self, { || <ClassName>():New() } )
Self := hb_SetObject( Self, {|| <ClassName>():New() } )
#xcommand ENDOBJECT => Self := hb_EndObject()

View File

@@ -456,7 +456,7 @@
#command JOIN [WITH <(alias)>] [TO <f>] [FIELDS <fields,...>] [FOR <for>] => ;
__dbJoin( <(alias)>, <(f)>, { <(fields)> }, ;
if(EMPTY(#<for>), { || .T. }, <{for}> ) )
if(EMPTY(#<for>), {|| .T. }, <{for}> ) )
#command COUNT [TO <v>] ;
[FOR <for>] [WHILE <while>] [NEXT <next>] ;
@@ -562,7 +562,7 @@
#command @ <row>, <col> GET <v> [<exp,...>] RANGE <l>, <h> [<nextexp,...>] => ;
@ <row>, <col> GET <v> [ <exp>] ;
VALID { |_1| RangeCheck( _1, , <l>, <h> ) } [ <nextexp>]
VALID {|_1| RangeCheck( _1, , <l>, <h> ) } [ <nextexp>]
#command @ <row>, <col> GET <v> [<exp,...>] COLOR <clr> [<nextexp,...>] => ;
@ <row>, <col> GET <v> [ <exp>] SEND colorDisp(<clr>) [ <nextexp>]
@@ -597,7 +597,7 @@
AAdd( GetList, _GET_( <v>, <(v)>, NIL, <{valid}>, <{when}> ) ) ;;
ATail(GetList):Control := _CheckBox_( <v>, <cap>, ;
<msg>, <clr>, <{fb}>, <{sb}>, <stl>, <bmaps> ) ;;
ATail(GetList):reader := { | a, b, c, d | GuiReader( a, b, c, d ) } ;;
ATail(GetList):reader := {| a, b, c, d | GuiReader( a, b, c, d ) } ;;
[ ATail(GetList):<snd> ;] [ ATail(GetList):Control:<gsnd> ;] ;
ATail(GetList):Control:Display()
@@ -611,7 +611,7 @@
ATail(GetList):Control := _ListBox_( ATail(Getlist):row, ;
ATail(Getlist):col, <bottom>, <right>, <v>, <items>, <cap>, ;
<msg>, <clr>, <{fb}>, <{sb}>, <.dd.>, <.sbar.>, <bmap> ) ;;
ATail(GetList):reader := { | a, b, c, d | GuiReader( a, b, c, d ) } ;;
ATail(GetList):reader := {| a, b, c, d | GuiReader( a, b, c, d ) } ;;
[ ATail(GetList):<snd> ;] [ ATail(GetList):Control:<gsnd> ;] ;
ATail(GetList):Control:Display()
@@ -626,7 +626,7 @@
AAdd( GetList, _GET_( <v>, <(v)>, NIL, <{valid}>, <{when}> ) ) ;;
ATail(GetList):Control := _PushButt_( <cap>, <msg>, <clr>, <{fb}>,;
<{sb}>, <stl>, <sX>, <sY>, <cX>, <cY>, <bmap>, <bX>, <bY> ) ;;
ATail(GetList):reader := { | a, b, c, d | GuiReader( a, b, c, d ) } ;;
ATail(GetList):reader := {| a, b, c, d | GuiReader( a, b, c, d ) } ;;
[ ATail(GetList):<snd> ;] [ ATail(GetList):Control:<gsnd> ;] ;
ATail(GetList):Control:Display()
@@ -640,7 +640,7 @@
ATail(GetList):Control := _RadioGrp_( ATail(Getlist):row, ;
ATail(Getlist):col, <bottom>, <right>, <v>, <buttons>, <cap>,;
<msg>, <clr>, <{fb}>, <stl> ) ;;
ATail(GetList):reader := { | a, b, c, d | GuiReader( a, b, c, d ) } ;;
ATail(GetList):reader := {| a, b, c, d | GuiReader( a, b, c, d ) } ;;
[ ATail(GetList):<snd> ;] [ ATail(GetList):Control:<gsnd> ;] ;
ATail(GetList):Control:Display()
@@ -653,7 +653,7 @@
<oBrowse>:nleft := ATail(Getlist):col ;;
<oBrowse>:nbottom := <bottom> ; <oBrowse>:nright := <right> ;;
<oBrowse>:Configure() ; ATail(GetList):Control := <oBrowse> ;;
ATail(GetList):reader := { | a, b, c, d | TBReader( a, b, c, d ) } ;
ATail(GetList):reader := {| a, b, c, d | TBReader( a, b, c, d ) } ;
[ ; ATail(GetList):Control:Message := <msg>] ;
[ ; ATail(GetList):<snd>] [ ; ATail(GetList):Control:<gsnd>]
@@ -666,7 +666,7 @@
<oBrowse>:nleft := ATail(Getlist):col ;;
<oBrowse>:nbottom := <bottom> ; <oBrowse>:nright := <right> ;;
<oBrowse>:Configure() ; ATail(GetList):Control := <oBrowse> ;;
ATail(GetList):reader := { | a, b, c, d | <a>->( TBReader( a, b, c, d ) ) } ;
ATail(GetList):reader := {| a, b, c, d | <a>->( TBReader( a, b, c, d ) ) } ;
[ ; ATail(GetList):Control:Message := <msg>] ;
[ ; ATail(GetList):<snd>] [ ; ATail(GetList):Control:<gsnd>]

View File

@@ -1455,7 +1455,7 @@ void hb_compExprCBVarDel( HB_CBVAR_PTR pVars )
/* Creates a set/get codeblock for passed expression used in __GET
*
* { | ~1 | IIF( ~1 == NIL, <pExpr>, <pExpr> := ~1 )}
* {| ~1 | IIF( ~1 == NIL, <pExpr>, <pExpr> := ~1 ) }
*
* NOTE: "~1" is not a valid variable name so there will be no collisions
*/

View File

@@ -724,7 +724,7 @@ PVAR hb_compVariableFind( HB_COMP_DECL, const char * szVarName, int * piPos, int
* cannot detach this local variable
* For example:
* LOCAL locvar
* STATIC stavar:={ | x | locvar}
* STATIC stavar:= {| x | locvar }
*
* NOTE: Clipper creates such a codeblock however at the
* time of codeblock evaluation it generates a runtime error:

View File

@@ -77,20 +77,20 @@ PROCEDURE __dbgHelp( nTopic )
oBrw := HBDbBrowser():New( oDlg:nTop + 1, oDlg:nLeft + 1, oDlg:nBottom - 1, oDlg:nLeft + 12 )
oBrw:Cargo := 1
oBrw:AddColumn( HBDbColumnNew( "", { || aTopics[ oBrw:Cargo ][ 1 ] }, 12 ) )
oBrw:AddColumn( HBDbColumnNew( "", {|| aTopics[ oBrw:Cargo ][ 1 ] }, 12 ) )
oBrw:ColorSpec := StrTran( __Dbg():ClrModal(), ", R/W", "" )
oBrw:SkipBlock := { | nSkip, nOld | nOld := oBrw:Cargo, oBrw:Cargo += nSkip,;
oBrw:SkipBlock := {| nSkip, nOld | nOld := oBrw:Cargo, oBrw:Cargo += nSkip,;
oBrw:Cargo := Min( Max( oBrw:Cargo, 1 ), Len( aTopics ) ),;
oBrw:Cargo - nOld }
oBrw:GoTopBlock := { || oBrw:Cargo := 1 }
oBrw:GoBottomBlock := { || oBrw:Cargo := Len( aTopics ) }
oBrw:GoTopBlock := {|| oBrw:Cargo := 1 }
oBrw:GoBottomBlock := {|| oBrw:Cargo := Len( aTopics ) }
IF nTopic > 1
Eval( oBrw:SkipBlock, nTopic - 1 )
ENDIF
oDlg:bPainted := { || PaintWindow( oDlg, oBrw, aTopics ) }
oDlg:bKeyPressed := { | nKey | ProcessKey( nKey, oDlg, oBrw, aTopics, oDlg:cColor ) }
oDlg:bPainted := {|| PaintWindow( oDlg, oBrw, aTopics ) }
oDlg:bKeyPressed := {| nKey | ProcessKey( nKey, oDlg, oBrw, aTopics, oDlg:cColor ) }
oDlg:ShowModal()

View File

@@ -115,12 +115,12 @@ METHOD addWindows( aArray, nRow ) CLASS HBDbArray
oBrwSets:Cargo := { 1, {} } // Actual highligthed row
AAdd( oBrwSets:Cargo[ 2 ], aArray )
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", { || ::arrayName + "[" + LTrim( Str( oBrwSets:cargo[ 1 ], 6 ) ) + "]" } ) )
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", {|| ::arrayName + "[" + LTrim( Str( oBrwSets:cargo[ 1 ], 6 ) ) + "]" } ) )
oCol:width := Len( ::arrayName + "[" + LTrim( Str( Len( aArray ), 6 ) ) + "]" )
oCol:DefColor := { 1, 2 }
nColWidth := oCol:Width
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", { || PadR( __dbgValToStr( aArray[ oBrwSets:cargo[ 1 ] ] ), nWidth - nColWidth - 1 ) } ) )
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", {|| PadR( __dbgValToStr( aArray[ oBrwSets:cargo[ 1 ] ] ), nWidth - nColWidth - 1 ) } ) )
/* 09/08/2004 - <maurilio.longo@libero.it>
Setting a fixed width like it is done in the next line of code wich I've
@@ -139,13 +139,13 @@ METHOD addWindows( aArray, nRow ) CLASS HBDbArray
oCol:defColor := { 1, 3 }
oBrwSets:goTopBlock := { || oBrwSets:cargo[ 1 ] := 1 }
oBrwSets:goBottomBlock := { || oBrwSets:cargo[ 1 ] := Len( oBrwSets:cargo[ 2 ][ 1 ] ) }
oBrwSets:skipBlock := { | nPos | ( nPos := ArrayBrowseSkip( nPos, oBrwSets ), oBrwSets:cargo[ 1 ] := ;
oBrwSets:goTopBlock := {|| oBrwSets:cargo[ 1 ] := 1 }
oBrwSets:goBottomBlock := {|| oBrwSets:cargo[ 1 ] := Len( oBrwSets:cargo[ 2 ][ 1 ] ) }
oBrwSets:skipBlock := {| nPos | ( nPos := ArrayBrowseSkip( nPos, oBrwSets ), oBrwSets:cargo[ 1 ] := ;
oBrwSets:cargo[ 1 ] + nPos, nPos ) }
::aWindows[ ::nCurWindow ]:bPainted := { || ( oBrwSets:forcestable(), RefreshVarsS( oBrwSets ) ) }
::aWindows[ ::nCurWindow ]:bKeyPressed := { | nKey | ::SetsKeyPressed( nKey, oBrwSets,;
::aWindows[ ::nCurWindow ]:bPainted := {|| ( oBrwSets:forcestable(), RefreshVarsS( oBrwSets ) ) }
::aWindows[ ::nCurWindow ]:bKeyPressed := {| nKey | ::SetsKeyPressed( nKey, oBrwSets,;
::aWindows[ ::nCurWindow ], ::arrayName, aArray ) }
SetCursor( SC_NONE )
@@ -165,7 +165,7 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbArray
// if confirming new record, append blank
IF __dbgInput( Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1,, @cValue, ;
{ | cValue | iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } )
{| cValue | iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } )
BEGIN SEQUENCE WITH {|oErr| break( oErr ) }
pItem[ nSet ] := &cValue
RECOVER USING oErr

View File

@@ -115,7 +115,7 @@ METHOD addWindows( hHash, nRow ) CLASS HBDbHash
oBrwSets:Cargo := { 1, {} } // Actual highligthed row
AAdd( oBrwSets:Cargo[ 2 ], hHash )
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", { || ::hashName + "[" + HashKeyString( hHash, oBrwSets:cargo[ 1 ] ) + "]" } ) )
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", {|| ::hashName + "[" + HashKeyString( hHash, oBrwSets:cargo[ 1 ] ) + "]" } ) )
// calculate max key length
nKeyLen := 0
@@ -124,7 +124,7 @@ METHOD addWindows( hHash, nRow ) CLASS HBDbHash
oCol:DefColor := { 1, 2 }
nColWidth := oCol:Width
oBrwSets:AddColumn( oCol := HBDbColumnNew( "" ,{ || PadR( __dbgValToStr( hb_HValueAt( hHash, oBrwSets:cargo[ 1 ] ) ), nWidth - nColWidth - 1 ) } ) )
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", {|| PadR( __dbgValToStr( hb_HValueAt( hHash, oBrwSets:cargo[ 1 ] ) ), nWidth - nColWidth - 1 ) } ) )
/* 09/08/2004 - <maurilio.longo@libero.it>
Setting a fixed width like it is done in the next line of code wich I've
@@ -143,13 +143,13 @@ METHOD addWindows( hHash, nRow ) CLASS HBDbHash
oCol:DefColor:= { 1, 3 }
oBrwSets:goTopBlock := { || oBrwSets:cargo[ 1 ] := 1 }
oBrwSets:goBottomBlock := { || oBrwSets:cargo[ 1 ] := Len( oBrwSets:cargo[ 2 ][ 1 ] ) }
oBrwSets:skipBlock := { |nPos| ( nPos := HashBrowseSkip(nPos, oBrwSets), oBrwSets:cargo[ 1 ] := ;
oBrwSets:goTopBlock := {|| oBrwSets:cargo[ 1 ] := 1 }
oBrwSets:goBottomBlock := {|| oBrwSets:cargo[ 1 ] := Len( oBrwSets:cargo[ 2 ][ 1 ] ) }
oBrwSets:skipBlock := {| nPos | ( nPos := HashBrowseSkip(nPos, oBrwSets), oBrwSets:cargo[ 1 ] := ;
oBrwSets:cargo[ 1 ] + nPos, nPos ) }
::aWindows[ ::nCurWindow ]:bPainted := { || ( oBrwSets:forcestable(), RefreshVarsS( oBrwSets ) ) }
::aWindows[ ::nCurWindow ]:bKeyPressed := { | nKey | ::SetsKeyPressed( nKey, oBrwSets,;
::aWindows[ ::nCurWindow ]:bPainted := {|| ( oBrwSets:forcestable(), RefreshVarsS( oBrwSets ) ) }
::aWindows[ ::nCurWindow ]:bKeyPressed := {| nKey | ::SetsKeyPressed( nKey, oBrwSets,;
::aWindows[ ::nCurWindow ],::hashName, hHash ) }
SetCursor( SC_NONE )
@@ -169,7 +169,7 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbHash
// if confirming new record, append blank
IF __dbgInput( Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1,, @cValue, ;
{ | cValue | iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } )
{| cValue | iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } )
BEGIN SEQUENCE WITH {|oErr| break( oErr ) }
HB_HValueAt( pItem, nSet, &cValue )
RECOVER USING oErr

View File

@@ -142,29 +142,29 @@ METHOD addWindows( aArray, nRow ) CLASS HBDbObject
oBrwSets:autolite := .T.
oBrwSets:ColorSpec := __Dbg():ClrModal()
oBrwSets:GoTopBlock := { || ::Arrayindex := 1 }
oBrwSets:GoBottomBlock := { || ::arrayindex := Len( ::ArrayReference ) }
oBrwSets:SkipBlock := { | nSkip, nPos | nPos := ::arrayindex,;
oBrwSets:GoTopBlock := {|| ::Arrayindex := 1 }
oBrwSets:GoBottomBlock := {|| ::arrayindex := Len( ::ArrayReference ) }
oBrwSets:SkipBlock := {| nSkip, nPos | nPos := ::arrayindex,;
::arrayindex := iif( nSkip > 0, Min( ::arrayindex + nSkip, Len( ::arrayReference ) ),;
Max( 1, ::arrayindex + nSkip ) ), ::arrayindex - nPos }
nMaxLen := ArrayMaxLen( ::AllNames )
oBrwSets:AddColumn( oCol := HBDbColumnNew( "",;
{ || PadR( ::ArrayReference[ ::arrayindex, 1 ], nMaxLen ) } ) )
{|| PadR( ::ArrayReference[ ::arrayindex, 1 ], nMaxLen ) } ) )
oCol:width := nMaxLen
oCol:ColorBlock := { || { iif( ::Arrayindex == oBrwSets:Cargo, 2, 1 ), 2 } }
oCol:ColorBlock := {|| { iif( ::Arrayindex == oBrwSets:Cargo, 2, 1 ), 2 } }
oBrwSets:Freeze := 1
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", { || iif( HB_ISSTRING( ::ArrayReference[ ::ArrayIndex, 2 ] ) .AND. !::ArrayReference[ ::ArrayIndex, 3 ],;
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", {|| iif( HB_ISSTRING( ::ArrayReference[ ::ArrayIndex, 2 ] ) .AND. !::ArrayReference[ ::ArrayIndex, 3 ],;
::ArrayReference[ ::ArrayIndex, 2 ],;
PadR( __dbgValToStr( __dbgObjGetValue( ::TheObj, ::ArrayReference[ ::arrayindex, 1 ] ) ), nWidth - 12 ) ) } ) )
oBrwSets:Cargo := 1 // Actual highlighted row
oCol:ColorBlock := { || { iif( ::Arrayindex == oBrwSets:Cargo, 3, 1 ), 3 } }
oCol:ColorBlock := {|| { iif( ::Arrayindex == oBrwSets:Cargo, 3, 1 ), 3 } }
oCol:width := MaxCol() - 14 - nMaxLen
oBrwSets:colPos := 2
::aWindows[ ::nCurWindow ]:bPainted := { || oBrwSets:ForceStable() }
::aWindows[ ::nCurWindow ]:bKeyPressed := { | nKey | ::SetsKeyPressed( nKey, oBrwSets, Len( aArray ), ::ArrayReference ) }
::aWindows[ ::nCurWindow ]:bPainted := {|| oBrwSets:ForceStable() }
::aWindows[ ::nCurWindow ]:bKeyPressed := {| nKey | ::SetsKeyPressed( nKey, oBrwSets, Len( aArray ), ::ArrayReference ) }
::aWindows[ ::nCurwindow ]:cCaption := ::objname + " is of class: " +::TheObj:ClassName()
SetCursor( SC_NONE )
@@ -196,7 +196,7 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbObject
cValue := PadR( __dbgValToStr( cValue ), column:Width )
IF __dbgInput( Row(), oBrowse:nLeft + oBrowse:GetColumn( 1 ):width + 1,, @cValue, ;
{ | cValue | iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } )
{| cValue | iif( Type( cValue ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } )
BEGIN SEQUENCE WITH {|oErr| break( oErr ) }
__dbgObjSetValue( ::TheObj, pitem[ nSet, 1 ], &cValue )
RECOVER USING oErr

View File

@@ -100,8 +100,8 @@ PROCEDURE __dbgShowWorkAreas()
oDlg := HBDbWindow():New( 2, 3, 21, 74, "", cColor )
oDlg:bKeyPressed := { | nKey | DlgWorkAreaKey( nKey, oDlg, aBrw, aAlias, @aStruc, @aInfo ) }
oDlg:bPainted := { || DlgWorkAreaPaint( oDlg, aBrw ) }
oDlg:bKeyPressed := {| nKey | DlgWorkAreaKey( nKey, oDlg, aBrw, aAlias, @aStruc, @aInfo ) }
oDlg:bPainted := {|| DlgWorkAreaPaint( oDlg, aBrw ) }
/* Alias browse */
@@ -109,16 +109,16 @@ PROCEDURE __dbgShowWorkAreas()
aBrw[ 1 ]:Cargo := ( n1 := cur_id )
aBrw[ 1 ]:ColorSpec := oDlg:cColor
aBrw[ 1 ]:GoTopBlock := { || aBrw[ 1 ]:Cargo := n1 := 1 }
aBrw[ 1 ]:GoBottomBlock := { || aBrw[ 1 ]:Cargo := n1 := Len( aAlias ) }
aBrw[ 1 ]:SkipBlock := { | nSkip, nPos | nPos := n1,;
aBrw[ 1 ]:Cargo := n1 := iif( nSkip > 0, Min( Len( aAlias ), n1 + nSkip ),;
Max( 1, n1 + nSkip ) ),;
n1 - nPos }
aBrw[ 1 ]:GoTopBlock := {|| aBrw[ 1 ]:Cargo := n1 := 1 }
aBrw[ 1 ]:GoBottomBlock := {|| aBrw[ 1 ]:Cargo := n1 := Len( aAlias ) }
aBrw[ 1 ]:SkipBlock := {| nSkip, nPos | nPos := n1,;
aBrw[ 1 ]:Cargo := n1 := iif( nSkip > 0, Min( Len( aAlias ), n1 + nSkip ),;
Max( 1, n1 + nSkip ) ),;
n1 - nPos }
aBrw[ 1 ]:AddColumn( oCol := HBDbColumnNew( "", { || PadR( aAlias[ n1 ][ 2 ], 11 ) } ) )
aBrw[ 1 ]:AddColumn( oCol := HBDbColumnNew( "", {|| PadR( aAlias[ n1 ][ 2 ], 11 ) } ) )
oCol:ColorBlock := { || iif( aAlias[ n1 ][ 1 ] == Select(), { 3, 4 }, { 1, 2 } ) }
oCol:ColorBlock := {|| iif( aAlias[ n1 ][ 1 ] == Select(), { 3, 4 }, { 1, 2 } ) }
/* Info Browse */
@@ -128,16 +128,16 @@ PROCEDURE __dbgShowWorkAreas()
aBrw[ 2 ]:Cargo := ( n2 := 1 )
aBrw[ 2 ]:ColorSpec := oDlg:cColor
aBrw[ 2 ]:GoTopBlock := { || aBrw[ 2 ]:Cargo := n2 := 1 }
aBrw[ 2 ]:GoBottomBlock := { || aBrw[ 2 ]:Cargo := n2 := Len( aInfo ) }
aBrw[ 2 ]:SkipBlock := { | nSkip, nPos | nPos := n2, ;
aBrw[ 2 ]:Cargo := n2 := iif( nSkip > 0, Min( Len( aInfo ), n2 + nSkip ), ;
Max( 1, n2 + nSkip ) ), ;
n2 - nPos }
aBrw[ 2 ]:GoTopBlock := {|| aBrw[ 2 ]:Cargo := n2 := 1 }
aBrw[ 2 ]:GoBottomBlock := {|| aBrw[ 2 ]:Cargo := n2 := Len( aInfo ) }
aBrw[ 2 ]:SkipBlock := {| nSkip, nPos | nPos := n2, ;
aBrw[ 2 ]:Cargo := n2 := iif( nSkip > 0, Min( Len( aInfo ), n2 + nSkip ), ;
Max( 1, n2 + nSkip ) ), ;
n2 - nPos }
aBrw[ 2 ]:AddColumn( oCol := HBDbColumnNew( "", { || PadR( aInfo[ n2 ], 38 ) } ) )
aBrw[ 2 ]:AddColumn( oCol := HBDbColumnNew( "", {|| PadR( aInfo[ n2 ], 38 ) } ) )
oCol:ColorBlock := { || iif( aAlias[ n1 ][ 1 ] == Select() .AND. n2 == 1, { 3, 4 }, { 1, 2 } ) }
oCol:ColorBlock := {|| iif( aAlias[ n1 ][ 1 ] == Select() .AND. n2 == 1, { 3, 4 }, { 1, 2 } ) }
/* Struc browse */
@@ -147,16 +147,16 @@ PROCEDURE __dbgShowWorkAreas()
aBrw[ 3 ]:Cargo := n3 := 1
aBrw[ 3 ]:ColorSpec := oDlg:cColor
aBrw[ 3 ]:GoTopBlock := { || aBrw[ 3 ]:Cargo := n3 := 1 }
aBrw[ 3 ]:GoBottomBlock := { || aBrw[ 3 ]:Cargo := n3 := Len( aStruc ) }
aBrw[ 3 ]:SkipBlock := { | nSkip, nPos | nPos := n3,;
aBrw[ 3 ]:Cargo := n3 := iif( nSkip > 0, Min( Len( aStruc ), n3 + nSkip ),;
Max( 1, n3 + nSkip ) ), n3 - nPos }
aBrw[ 3 ]:GoTopBlock := {|| aBrw[ 3 ]:Cargo := n3 := 1 }
aBrw[ 3 ]:GoBottomBlock := {|| aBrw[ 3 ]:Cargo := n3 := Len( aStruc ) }
aBrw[ 3 ]:SkipBlock := {| nSkip, nPos | nPos := n3,;
aBrw[ 3 ]:Cargo := n3 := iif( nSkip > 0, Min( Len( aStruc ), n3 + nSkip ),;
Max( 1, n3 + nSkip ) ), n3 - nPos }
aBrw[ 3 ]:AddColumn( HBDbColumnNew( "", { || PadR( aStruc[ n3, 1 ], 11 ) + ;
aStruc[ n3, 2 ] + ;
Str( aStruc[ n3, 3 ], 4 ) + ;
Str( aStruc[ n3, 4 ], 3 ) } ) )
aBrw[ 3 ]:AddColumn( HBDbColumnNew( "", {|| PadR( aStruc[ n3, 1 ], 11 ) + ;
aStruc[ n3, 2 ] + ;
Str( aStruc[ n3, 3 ], 4 ) + ;
Str( aStruc[ n3, 4 ], 3 ) } ) )
/* Show dialog */

View File

@@ -323,7 +323,7 @@ CREATE CLASS HBDebugger
METHOD ShowVars()
METHOD RedisplayBreakpoints()
METHOD LocatePrgPath( cPrgName )
METHOD Sort() INLINE ASort( ::aVars,,, { | x, y | x[ 1 ] < y[ 1 ] } ),;
METHOD Sort() INLINE ASort( ::aVars,,, {| x, y | x[ 1 ] < y[ 1 ] } ),;
::lSortVars := .T.,;
iif( ::oBrwVars != NIL, ::oBrwVars:RefreshAll(), NIL ),;
iif( ::oWndVars != NIL .AND. ::oWndVars:lVisible, iif( !::lGo .AND. ::oBrwVars != NIL, ::oBrwVars:ForceStable(), NIL ), NIL )
@@ -399,11 +399,11 @@ METHOD New() CLASS HBDebugger
::oWndCode := HBDbWindow():New( 1, 0, ::nMaxRow - 6, ::nMaxCol )
::oWndCode:Cargo := { ::oWndCode:nTop, ::oWndCode:nLeft }
::oWndCode:bKeyPressed := { | nKey | ::CodeWindowProcessKey( nKey ) }
::oWndCode:bGotFocus := { || ::oGet:SetFocus() }
::oWndCode:bLostFocus := { || ::oGet:KillFocus(), SetCursor( SC_NONE ), ;
::oWndCode:Cargo[ 1 ] := Row(), ;
::oWndCode:Cargo[ 2 ] := Col() }
::oWndCode:bKeyPressed := {| nKey | ::CodeWindowProcessKey( nKey ) }
::oWndCode:bGotFocus := {|| ::oGet:SetFocus() }
::oWndCode:bLostFocus := {|| ::oGet:KillFocus(), SetCursor( SC_NONE ), ;
::oWndCode:Cargo[ 1 ] := Row(), ;
::oWndCode:Cargo[ 2 ] := Col() }
AAdd( ::aWindows, ::oWndCode )
@@ -519,16 +519,16 @@ METHOD BuildBrowseStack() CLASS HBDebugger
aColors := __DbgColors()
::oBrwStack := HBDbBrowser():New( 2, ::nMaxCol - 14, ::nMaxRow - 7, ::nMaxCol - 1 )
::oBrwStack:ColorSpec := aColors[ 3 ] + "," + aColors[ 4 ] + "," + aColors[ 5 ] + "," + aColors[ 6 ]
::oBrwStack:goTopBlock := { || ::oBrwStack:Cargo := 1 }
::oBrwStack:goBottomBlock := { || ::oBrwStack:Cargo := Len( ::aProcStack ) }
::oBrwStack:skipBlock := { | nSkip, nOld | nOld := ::oBrwStack:Cargo,;
::oBrwStack:goTopBlock := {|| ::oBrwStack:Cargo := 1 }
::oBrwStack:goBottomBlock := {|| ::oBrwStack:Cargo := Len( ::aProcStack ) }
::oBrwStack:skipBlock := {| nSkip, nOld | nOld := ::oBrwStack:Cargo,;
::oBrwStack:Cargo += nSkip,;
::oBrwStack:Cargo := Min( Max( ::oBrwStack:Cargo, 1 ),;
Len( ::aProcStack ) ), ::oBrwStack:Cargo - nOld }
::oBrwStack:Cargo := 1 // Actual highligthed row
::oBrwStack:AddColumn( HBDbColumnNew( "", { || iif( Len( ::aProcStack ) > 0,;
::oBrwStack:AddColumn( HBDbColumnNew( "", {|| iif( Len( ::aProcStack ) > 0,;
PadC( ::aProcStack[ ::oBrwStack:Cargo ][ CSTACK_FUNCTION ], 14 ), Space( 14 ) ) } ) )
ENDIF
@@ -541,10 +541,10 @@ METHOD BuildCommandWindow() CLASS HBDebugger
::oWndCommand := HBDbWindow():New( ::nMaxRow - 5, 0, ::nMaxRow - 1, ::nMaxCol, "Command" )
::oWndCommand:bGotFocus := { || ::oGet:SetFocus() }
::oWndCommand:bLostFocus := { || ::oGet:KillFocus(), SetCursor( SC_NONE ) }
::oWndCommand:bKeyPressed := { | nKey | ::CommandWindowProcessKey( nKey ) }
::oWndCommand:bPainted := { || hb_dispOutAt( ::oWndCommand:nBottom - 1,;
::oWndCommand:bGotFocus := {|| ::oGet:SetFocus() }
::oWndCommand:bLostFocus := {|| ::oGet:KillFocus(), SetCursor( SC_NONE ) }
::oWndCommand:bKeyPressed := {| nKey | ::CommandWindowProcessKey( nKey ) }
::oWndCommand:bPainted := {|| hb_dispOutAt( ::oWndCommand:nBottom - 1,;
::oWndCommand:nLeft + 1, "> ", __DbgColors()[ 2 ] ),;
::oGet:setColor( __DbgColors()[ 2 ] ):display(),;
hb_ClrArea( ::oWndCommand:nTop + 1, ::oWndCommand:nLeft + 1,;
@@ -729,26 +729,26 @@ METHOD Colors() CLASS HBDebugger
oBrwColors:Cargo := { 1, {} } // Actual highligthed row
oBrwColors:ColorSpec := ::ClrModal()
oBrwColors:goTopBlock := { || oBrwColors:cargo[ 1 ] := 1 }
oBrwColors:goBottomBlock := { || oBrwColors:cargo[ 1 ] := Len( oBrwColors:cargo[ 2 ][ 1 ] ) }
oBrwColors:skipBlock := { | nPos | ( nPos := ArrayBrowseSkip( nPos, oBrwColors ), oBrwColors:cargo[ 1 ] := ;
oBrwColors:goTopBlock := {|| oBrwColors:cargo[ 1 ] := 1 }
oBrwColors:goBottomBlock := {|| oBrwColors:cargo[ 1 ] := Len( oBrwColors:cargo[ 2 ][ 1 ] ) }
oBrwColors:skipBlock := {| nPos | ( nPos := ArrayBrowseSkip( nPos, oBrwColors ), oBrwColors:cargo[ 1 ] := ;
oBrwColors:cargo[ 1 ] + nPos, nPos ) }
oBrwColors:AddColumn( oCol := HBDbColumnNew( "", { || PadR( aColors[ oBrwColors:Cargo[ 1 ] ], 14 ) } ) )
oBrwColors:AddColumn( oCol := HBDbColumnNew( "", {|| PadR( aColors[ oBrwColors:Cargo[ 1 ] ], 14 ) } ) )
oCol:defColor := { 1, 2 }
AAdd( oBrwColors:Cargo[ 2 ], aColors )
oBrwColors:AddColumn( oCol := HBDbColumnNew( "",;
{ || PadR( '"' + ::aColors[ oBrwColors:Cargo[ 1 ] ] + '"', nWidth - 15 ) } ) )
{|| PadR( '"' + ::aColors[ oBrwColors:Cargo[ 1 ] ] + '"', nWidth - 15 ) } ) )
AAdd( oBrwColors:Cargo[ 2 ], aColors )
oCol:defColor := { 1, 3 }
ocol:width := 50
oBrwColors:autolite := .F.
oWndColors:bPainted := { || oBrwColors:ForceStable(), RefreshVarsS( oBrwColors ) }
oWndColors:bPainted := {|| oBrwColors:ForceStable(), RefreshVarsS( oBrwColors ) }
oWndColors:bKeyPressed := { | nKey | SetsKeyPressed( nKey, oBrwColors,;
Len( aColors ), oWndColors, "Debugger Colors",;
{ || ::EditColor( oBrwColors:Cargo[ 1 ], oBrwColors ) } ) }
oWndColors:bKeyPressed := {| nKey | SetsKeyPressed( nKey, oBrwColors,;
Len( aColors ), oWndColors, "Debugger Colors",;
{|| ::EditColor( oBrwColors:Cargo[ 1 ], oBrwColors ) } ) }
oWndColors:ShowModal()
::LoadColors()
@@ -1092,8 +1092,8 @@ METHOD EditColor( nColor, oBrwColors ) CLASS HBDebugger
oBrwColors:ForceStable()
IF __dbgInput( Row(), Col() + 15,, @cColor, ;
{ | cColor | iif( Type( cColor ) != "C", ;
( __dbgAlert( "Must be string" ), .F. ), .T. ) }, ;
{| cColor | iif( Type( cColor ) != "C", ;
( __dbgAlert( "Must be string" ), .F. ), .T. ) }, ;
SubStr( ::ClrModal(), 5 ) )
::aColors[ nColor ] := &cColor
ENDIF
@@ -1112,8 +1112,8 @@ METHOD EditSet( nSet, oBrwSets ) CLASS HBDebugger
oBrwSets:ForceStable()
IF __dbgInput( Row(), Col() + 13,, @cSet, ;
{ | cSet | iif( Type( cSet ) != cType, ;
( __dbgAlert( "Must be of type '" + cType + "'" ), .F. ), .T. ) }, ;
{| cSet | iif( Type( cSet ) != cType, ;
( __dbgAlert( "Must be of type '" + cType + "'" ), .F. ), .T. ) }, ;
SubStr( ::ClrModal(), 5 ) )
Set( nSet, &cSet )
ENDIF
@@ -1137,7 +1137,7 @@ METHOD EditVar( nVar ) CLASS HBDebugger
::InputBox( cVarName, uVarValue, NIL, .F. )
ELSE
cVarStr := ::InputBox( cVarName, __dbgValToStr( uVarValue ),;
{ | u | iif( Type( u ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } )
{| u | iif( Type( u ) == "UE", ( __dbgAlert( "Expression error" ), .F. ), .T. ) } )
ENDIF
IF LastKey() != K_ESC
@@ -1184,7 +1184,7 @@ METHOD GetExprValue( xExpr, lValid ) CLASS HBDebugger
lValid := .F.
BEGIN SEQUENCE WITH { | oErr | Break( oErr ) }
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
xResult := __dbgGetExprValue( ::pInfo, xExpr, @lValid )
IF !lValid
xResult := "Syntax error"
@@ -1193,7 +1193,7 @@ METHOD GetExprValue( xExpr, lValid ) CLASS HBDebugger
xResult := oErr:operation + ": " + oErr:description
IF HB_ISARRAY( oErr:args )
xResult += "; arguments:"
AEval( oErr:args, { | x | xResult += " " + AllTrim( __dbgCStr( x ) ) } )
AEval( oErr:args, {| x | xResult += " " + AllTrim( __dbgCStr( x ) ) } )
ENDIF
lValid := .F.
END SEQUENCE
@@ -1612,7 +1612,7 @@ METHOD ListBox( cCaption, aItems ) CLASS HBDebugger
nItems := Len( aItems )
nMaxWid := Len( cCaption ) + 2
AEval( aItems, { | x | nMaxWid := Max( Len( x ), nMaxWid ) } )
AEval( aItems, {| x | nMaxWid := Max( Len( x ), nMaxWid ) } )
nMaxWid += 2
nTop := ( ::nMaxRow / 2 ) - Min( nItems, ::nMaxRow - 5 ) / 2
@@ -1647,7 +1647,7 @@ METHOD LoadCallStack() CLASS HBDebugger
FOR i := nDebugLevel TO nCurrLevel
nLevel := nCurrLevel - i + 1
nPos := AScan( ::aCallStack, { | a | a[ CSTACK_LEVEL ] == nLevel } )
nPos := AScan( ::aCallStack, {| a | a[ CSTACK_LEVEL ] == nLevel } )
IF nPos > 0
// a procedure with debug info
::aProcStack[ i - nDebugLevel + 1 ] := ::aCallStack[ nPos ]
@@ -1748,7 +1748,7 @@ METHOD LoadVars() CLASS HBDebugger // updates monitored variables
IF ::lShowStatics
cName := ::aProcStack[ ::oBrwStack:Cargo ][ CSTACK_MODULE ]
n := AScan( ::aModules, { | a | hb_FileMatch( a[ MODULE_NAME ], cName ) } )
n := AScan( ::aModules, {| a | hb_FileMatch( a[ MODULE_NAME ], cName ) } )
IF n > 0
aVars := ::aModules[ n ][ MODULE_STATICS ]
FOR m := 1 TO Len( aVars )
@@ -1766,7 +1766,7 @@ METHOD LoadVars() CLASS HBDebugger // updates monitored variables
FOR n := 1 TO Len( aVars )
cName := aVars[ n ][ VAR_NAME ]
m := AScan( aBVars,; // Is there another var with this name ?
{ | aVar | aVar[ VAR_NAME ] == cName .AND. Left( aVar[ VAR_TYPE ], 1 ) == "S" } )
{| aVar | aVar[ VAR_NAME ] == cName .AND. Left( aVar[ VAR_TYPE ], 1 ) == "S" } )
IF m > 0
aBVars[ m ] := aVars[ n ]
ELSE
@@ -1974,7 +1974,7 @@ METHOD OSShell() CLASS HBDebugger
QOut( "Type 'exit' to RETURN to the Debugger" )
SetCursor( SC_NORMAL )
BEGIN SEQUENCE WITH { | objErr | Break( objErr ) }
BEGIN SEQUENCE WITH {| objErr | Break( objErr ) }
#if defined( __PLATFORM__WINDOWS ) .OR. ;
defined( __PLATFORM__DOS ) .OR. ;
@@ -2102,7 +2102,7 @@ METHOD RefreshVars() CLASS HBDebugger
METHOD RemoveWindow( oWnd ) CLASS HBDebugger
LOCAL n := AScan( ::aWindows, { | o | o == oWnd } )
LOCAL n := AScan( ::aWindows, {| o | o == oWnd } )
IF n != 0
::aWindows := ADel( ::aWindows, n )
@@ -2423,8 +2423,8 @@ METHOD ShowCallStack() CLASS HBDebugger
::oWndStack := HBDbWindow():New( 1, ::nMaxCol - 15, ::nMaxRow - 6, ::nMaxCol,;
"Calls" )
::oWndStack:bKeyPressed := { | nKey | ::CallStackProcessKey( nKey ) }
::oWndStack:bLButtonDown := { || ::CallStackProcessKey( K_LBUTTONDOWN ) }
::oWndStack:bKeyPressed := {| nKey | ::CallStackProcessKey( nKey ) }
::oWndStack:bLButtonDown := {|| ::CallStackProcessKey( K_LBUTTONDOWN ) }
AAdd( ::aWindows, ::oWndStack )
//::nCurrentWindow := Len( ::aWindows )
@@ -2433,10 +2433,10 @@ METHOD ShowCallStack() CLASS HBDebugger
::BuildBrowseStack()
ENDIF
::oWndStack:bPainted := { || ::oBrwStack:ColorSpec := __DbgColors()[ 2 ] + "," + ;
__DbgColors()[ 5 ] + "," + __DbgColors()[ 4 ] + "," + __DbgColors()[ 6 ],;
::oBrwStack:RefreshAll(), ::oBrwStack:ForceStable() }
::oWndStack:bGotFocus := { || SetCursor( SC_NONE ) }
::oWndStack:bPainted := {|| ::oBrwStack:ColorSpec := __DbgColors()[ 2 ] + "," + ;
__DbgColors()[ 5 ] + "," + __DbgColors()[ 4 ] + "," + __DbgColors()[ 6 ],;
::oBrwStack:RefreshAll(), ::oBrwStack:ForceStable() }
::oWndStack:bGotFocus := {|| SetCursor( SC_NONE ) }
::oWndStack:Show( .F. )
ENDIF
@@ -2507,7 +2507,7 @@ METHOD ShowCodeLine( nProc ) CLASS HBDebugger
::oBrwText:LoadFile(cPrgName)
ENDIF
::oWndCode:bPainted := { || iif( ::oBrwText != NIL, ::oBrwText:RefreshAll():ForceStable(), ::oWndCode:Clear() ) }
::oWndCode:bPainted := {|| iif( ::oBrwText != NIL, ::oBrwText:RefreshAll():ForceStable(), ::oWndCode:Clear() ) }
::RedisplayBreakpoints() // check for breakpoints in this file and display them
::oWndCode:SetCaption( ::cPrgName )
::oWndCode:Refresh() // to force the window caption to update
@@ -2565,11 +2565,11 @@ METHOD ShowVars() CLASS HBDebugger
iif( ::lShowStatics, " Static", "" ) + iif( ::lShowPrivates, " Private", "" ) + ;
iif( ::lShowPublics, " Public", "" ) )
::oWndVars:bLButtonDown := { | nMRow, nMCol | ::WndVarsLButtonDown( nMRow, nMCol ) }
::oWndVars:bLDblClick := { || ::EditVar( ::oBrwVars:Cargo[ 1 ] ) }
::oWndVars:bPainted := { || iif(Len( ::aVars ) > 0, ( ::oBrwVars:RefreshAll():ForceStable(),RefreshVarsS(::oBrwVars) ),) }
::oWndVars:bLButtonDown := {| nMRow, nMCol | ::WndVarsLButtonDown( nMRow, nMCol ) }
::oWndVars:bLDblClick := {|| ::EditVar( ::oBrwVars:Cargo[ 1 ] ) }
::oWndVars:bPainted := {|| iif(Len( ::aVars ) > 0, ( ::oBrwVars:RefreshAll():ForceStable(),RefreshVarsS(::oBrwVars) ),) }
::oWndVars:bKeyPressed := { | nKey | iif( Len( ::aVars ) == 0, NIL, ( ;
::oWndVars:bKeyPressed := {| nKey | iif( Len( ::aVars ) == 0, NIL, ( ;
iif( nKey == K_DOWN, ::oBrwVars:Down(), NIL ) ;
, iif( nKey == K_UP, ::oBrwVars:Up(), NIL ) ;
, iif( nKey == K_PGDN, ::oBrwVars:PageDown(), NIL ) ;
@@ -2611,18 +2611,18 @@ METHOD ShowVars() CLASS HBDebugger
aColors := __DbgColors()
::oBrwVars:Cargo := { 1, {} } // Actual highlighted row
::oBrwVars:ColorSpec := aColors[ 2 ] + "," + aColors[ 5 ] + "," + aColors[ 3 ] + "," + aColors[ 6 ]
::oBrwVars:goTopBlock := { || ::oBrwVars:cargo[ 1 ] := Min( 1, Len( ::aVars ) ) }
::oBrwVars:goBottomBlock := { || ::oBrwVars:cargo[ 1 ] := Max( 1, Len( ::aVars ) ) }
::oBrwVars:skipBlock := { | nSkip, nOld | ;
::oBrwVars:goTopBlock := {|| ::oBrwVars:cargo[ 1 ] := Min( 1, Len( ::aVars ) ) }
::oBrwVars:goBottomBlock := {|| ::oBrwVars:cargo[ 1 ] := Max( 1, Len( ::aVars ) ) }
::oBrwVars:skipBlock := {| nSkip, nOld | ;
nOld := ::oBrwVars:Cargo[ 1 ],;
::oBrwVars:Cargo[ 1 ] += nSkip,;
::oBrwVars:Cargo[ 1 ] := Min( Max( ::oBrwVars:Cargo[ 1 ], 1 ), Len( ::aVars ) ),;
::oBrwVars:Cargo[ 1 ] - nOld }
oCol := HBDbColumnNew( "", ;
{ || PadR( hb_NToS( ::oBrwVars:Cargo[ 1 ] - 1 ) + ") " + ;
::VarGetInfo( ::aVars[ Max( ::oBrwVars:Cargo[ 1 ], 1 ) ] ), ;
::oWndVars:nWidth() - 2 ) } )
{|| PadR( hb_NToS( ::oBrwVars:Cargo[ 1 ] - 1 ) + ") " + ;
::VarGetInfo( ::aVars[ Max( ::oBrwVars:Cargo[ 1 ], 1 ) ] ), ;
::oWndVars:nWidth() - 2 ) } )
::oBrwVars:AddColumn( oCol )
AAdd( ::oBrwVars:Cargo[ 2 ], ::aVars )
oCol:DefColor := { 1, 2 }
@@ -2742,8 +2742,8 @@ METHOD ToggleBreakPoint( nLine, cFileName ) CLASS HBDebugger
RETURN NIL
ENDIF
nAt := AScan( ::aBreakPoints, { | aBreak | aBreak[ 1 ] == nLine ;
.AND. hb_FileMatch( aBreak[ 2 ], cFileName ) } )
nAt := AScan( ::aBreakPoints, {| aBreak | aBreak[ 1 ] == nLine ;
.AND. hb_FileMatch( aBreak[ 2 ], cFileName ) } )
IF nAt == 0
AAdd( ::aBreakPoints, { nLine, cFileName } ) // it was nLine
@@ -2878,21 +2878,21 @@ METHOD ViewSets() CLASS HBDebugger
oBrwSets:Cargo := { 1, {} } // Actual highlighted row
oBrwSets:autolite := .F.
oBrwSets:ColorSpec := ::ClrModal()
oBrwSets:goTopBlock := { || oBrwSets:cargo[ 1 ] := 1 }
oBrwSets:goBottomBlock := { || oBrwSets:cargo[ 1 ] := Len( oBrwSets:cargo[ 2 ][ 1 ] ) }
oBrwSets:skipBlock := { | nPos | ( nPos := ArrayBrowseSkip( nPos, oBrwSets ), oBrwSets:cargo[ 1 ] := ;
oBrwSets:goTopBlock := {|| oBrwSets:cargo[ 1 ] := 1 }
oBrwSets:goBottomBlock := {|| oBrwSets:cargo[ 1 ] := Len( oBrwSets:cargo[ 2 ][ 1 ] ) }
oBrwSets:skipBlock := {| nPos | ( nPos := ArrayBrowseSkip( nPos, oBrwSets ), oBrwSets:cargo[ 1 ] := ;
oBrwSets:cargo[ 1 ] + nPos, nPos ) }
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", { || PadR( aSets[ oBrwSets:cargo[ 1 ] ], 12 ) } ) )
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", {|| PadR( aSets[ oBrwSets:cargo[ 1 ] ], 12 ) } ) )
AAdd( oBrwSets:Cargo[ 2 ], aSets )
ocol:defcolor := { 1, 2 }
oBrwSets:AddColumn( oCol := HBDbColumnNew( "",;
{ || PadR( __dbgValToStr( Set( oBrwSets:cargo[ 1 ] ) ), nWidth - 13 ) } ) )
{|| PadR( __dbgValToStr( Set( oBrwSets:cargo[ 1 ] ) ), nWidth - 13 ) } ) )
ocol:defcolor := { 1, 3 }
ocol:width := 40
oWndSets:bPainted := { || oBrwSets:ForceStable(), RefreshVarsS( oBrwSets ) }
oWndSets:bKeyPressed := { | nKey | SetsKeyPressed( nKey, oBrwSets, Len( aSets ),;
oWndSets:bPainted := {|| oBrwSets:ForceStable(), RefreshVarsS( oBrwSets ) }
oWndSets:bKeyPressed := {| nKey | SetsKeyPressed( nKey, oBrwSets, Len( aSets ),;
oWndSets, "System Settings",;
{ || ::EditSet( oBrwSets:Cargo[ 1 ], oBrwSets ) } ) }
{|| ::EditSet( oBrwSets:Cargo[ 1 ], oBrwSets ) } ) }
SetCursor( SC_NONE )
oWndSets:ShowModal()
@@ -3063,8 +3063,8 @@ METHOD WatchpointsShow() CLASS HBDebugger
// ::oBrwText:RefreshAll()
// ::oWndCode:SetFocus( .T. )
// ::oWndPnt:bLButtonDown := { | nMRow, nMCol | ::WndVarsLButtonDown( nMRow, nMCol ) }
// ::oWndPnt:bLDblClick := { | nMRow, nMCol | ::EditVar( ::oBrwPnt:Cargo[ 1 ] ) }
// ::oWndPnt:bLButtonDown := {| nMRow, nMCol | ::WndVarsLButtonDown( nMRow, nMCol ) }
// ::oWndPnt:bLDblClick := {| nMRow, nMCol | ::EditVar( ::oBrwPnt:Cargo[ 1 ] ) }
::oBrwPnt := HBDbBrowser():New( nTop + 1, 1, ::oWndPnt:nBottom - 1, ::nMaxCol - iif( ::oWndStack != NIL,;
::oWndStack:nWidth(), 0 ) - 1 )
@@ -3074,27 +3074,27 @@ METHOD WatchpointsShow() CLASS HBDebugger
::oBrwPnt:Cargo := { 1, {} } // Actual highlighted row
aColors := __DbgColors()
::oBrwPnt:ColorSpec := aColors[ 2 ] + "," + aColors[ 5 ] + "," + aColors[ 3 ] + "," + aColors[ 6 ]
::oBrwPnt:goTopBlock := { || ::oBrwPnt:cargo[ 1 ] := Min( 1, Len(::aWatch ) ) }
::oBrwPnt:goBottomBlock := { || ::oBrwPnt:cargo[ 1 ] := Len( ::aWatch ) }
::oBrwPnt:skipBlock := { | nSkip, nOld | nOld := ::oBrwPnt:Cargo[ 1 ],;
::oBrwPnt:Cargo[ 1 ] += nSkip,;
::oBrwPnt:Cargo[ 1 ] := Min( Max( ::oBrwPnt:Cargo[ 1 ], 1 ),;
::oBrwPnt:goTopBlock := {|| ::oBrwPnt:cargo[ 1 ] := Min( 1, Len(::aWatch ) ) }
::oBrwPnt:goBottomBlock := {|| ::oBrwPnt:cargo[ 1 ] := Len( ::aWatch ) }
::oBrwPnt:skipBlock := {| nSkip, nOld | nOld := ::oBrwPnt:Cargo[ 1 ],;
::oBrwPnt:Cargo[ 1 ] += nSkip,;
::oBrwPnt:Cargo[ 1 ] := Min( Max( ::oBrwPnt:Cargo[ 1 ], 1 ),;
Len( ::aWatch ) ),;
iif( Len(::aWatch) > 0, ::oBrwPnt:Cargo[ 1 ] - nOld, 0 ) }
iif( Len(::aWatch) > 0, ::oBrwPnt:Cargo[ 1 ] - nOld, 0 ) }
oCol := HBDbColumnNew( "", ;
{ || PadR( iif( Len( ::aWatch ) > 0, ;
hb_NToS( ::oBrwPnt:Cargo[ 1 ] - 1 ) + ") " + ;
::WatchGetInfo( Max( ::oBrwPnt:Cargo[ 1 ], 1 ) ), ;
" " ), ;
::oWndPnt:nWidth() - 2 ) } )
{|| PadR( iif( Len( ::aWatch ) > 0, ;
hb_NToS( ::oBrwPnt:Cargo[ 1 ] - 1 ) + ") " + ;
::WatchGetInfo( Max( ::oBrwPnt:Cargo[ 1 ], 1 ) ), ;
" " ), ;
::oWndPnt:nWidth() - 2 ) } )
::oBrwPnt:AddColumn( oCol )
AAdd( ::oBrwPnt:Cargo[ 2 ], ::aWatch)
oCol:DefColor := { 1, 2 }
::oWndPnt:bPainted := { || iif( Len( ::aWatch ) > 0, ( ::oBrwPnt:RefreshAll():ForceStable(), RefreshVarsS( ::oBrwPnt ) /*, ::RefreshVars()*/ ) , ) }
::oWndPnt:bPainted := {|| iif( Len( ::aWatch ) > 0, ( ::oBrwPnt:RefreshAll():ForceStable(), RefreshVarsS( ::oBrwPnt ) /*, ::RefreshVars()*/ ) , ) }
::oWndPnt:bKeyPressed := { | nKey | ;
::oWndPnt:bKeyPressed := {| nKey | ;
( iif( nKey == K_DOWN, ::oBrwPnt:Down(), NIL ) ;
, iif( nKey == K_UP, ::oBrwPnt:Up(), NIL ) ;
, iif( nKey == K_PGDN, ::oBrwPnt:PageDown(), NIL ) ;
@@ -3272,7 +3272,7 @@ STATIC FUNCTION PathToArray( cList )
AAdd( aList, cList ) // Add final element
/* Strip ending delimiters */
AEval( aList, { | x, i | iif( Right( x, 1 ) $ cDirSep, aList[ i ] := Left( x, Len( x ) - 1 ), ) } )
AEval( aList, {| x, i | iif( Right( x, 1 ) $ cDirSep, aList[ i ] := Left( x, Len( x ) - 1 ), ) } )
ENDIF
RETURN aList

View File

@@ -57,7 +57,7 @@
ANNOUNCE DBFNTX
procedure DBFNTXInit
PROCEDURE DBFNTXInit
REQUEST _DBF
REQUEST _DBFNTX
@@ -66,7 +66,7 @@ procedure DBFNTXInit
rddRegister( "DBFNTX", RDT_FULL )
rddInfo( RDDI_MEMOTYPE, DB_MEMO_DBT, "DBFNTX" )
return
RETURN
*/
/* NOTE: Commented out, because in Harbour the INIT order is not guaranteed,
@@ -75,18 +75,18 @@ return
/*
init procedure InitHandler
INIT PROCEDURE InitHandler
local bOldError := ErrorBlock( { | oError | LockErrHandler( oError, bOldError ) } )
LOCAL bOldError := ErrorBlock( {| oError | LockErrHandler( oError, bOldError ) } )
return
RETURN
static function LockErrHandler( oError, bOldError )
STATIC FUNCTION LockErrHandler( oError, bOldError )
if oError:GenCode == EG_LOCK
return .T.
endif
IF oError:GenCode == EG_LOCK
RETURN .T.
ENDIF
return Eval( bOldError, oError )
RETURN Eval( bOldError, oError )
*/

View File

@@ -181,7 +181,7 @@ FUNCTION Sx_Compress( xVal )
xRetVal := _sx_strCompress( xVal )
ELSEIF cType == "A"
xRetVal := Array( Len( xVal ) )
aEval( xVal, { |x| xRetVal := Sx_Compress( x ) } )
aEval( xVal, {| x | xRetVal := Sx_Compress( x ) } )
ELSE
xRetVal := xVal
ENDIF
@@ -193,7 +193,7 @@ FUNCTION Sx_Decompress( xVal )
xRetVal := _sx_strDecompress( xVal )
ELSEIF cType == "A"
xRetVal := Array( Len( xVal ) )
aEval( xVal, { |x| xRetVal := Sx_Decompress( x ) } )
aEval( xVal, {| x | xRetVal := Sx_Decompress( x ) } )
ELSE
xRetVal := xVal
ENDIF

View File

@@ -84,7 +84,7 @@ STATIC FUNCTION _HSX_NEW( pWA )
RETURN HB_SUCCESS
STATIC FUNCTION _HSX_CLOSE( nWA )
LOCAL aWData:= USRRDD_AREADATA( nWA ), nHSX
LOCAL aWData := USRRDD_AREADATA( nWA ), nHSX
/* close all HSX indexes */
FOR EACH nHSX IN aWData[ 2 ]
@@ -103,7 +103,7 @@ STATIC FUNCTION _HSX_GOCOLD( nWA )
nResult := UR_SUPER_GOCOLD( nWA )
IF nResult == HB_SUCCESS
aWData:= USRRDD_AREADATA( nWA )
aWData := USRRDD_AREADATA( nWA )
IF aWData[ 1 ]
IF !EMPTY( aWData[ 2 ] )
nRecNo := RECNO()
@@ -129,7 +129,7 @@ STATIC FUNCTION _HSX_GOHOT( nWA )
nResult := UR_SUPER_GOHOT( nWA )
IF nResult == HB_SUCCESS
aWData:= USRRDD_AREADATA( nWA )
aWData := USRRDD_AREADATA( nWA )
aWData[ 1 ] := .T.
ENDIF
@@ -140,7 +140,7 @@ STATIC FUNCTION _HSX_APPEND( nWA, lUnlockAll )
nResult := UR_SUPER_APPEND( nWA, lUnlockAll )
IF nResult == HB_SUCCESS
aWData:= USRRDD_AREADATA( nWA )
aWData := USRRDD_AREADATA( nWA )
aWData[ 1 ] := .T.
ENDIF
@@ -156,7 +156,7 @@ FUNCTION HSX_CREATE( cFile, cExpr, nKeySize, nBufSize, lCase, nFiltSet )
IF !USED()
ELSEIF !RDDNAME() == "HSCDX"
ELSE
aWData:= USRRDD_AREADATA( SELECT() )
aWData := USRRDD_AREADATA( SELECT() )
nOpenMode := IIF( DBINFO( DBI_SHARED ), 1, 0 ) + ;
IIF( DBINFO( DBI_ISREADONLY ), 2, 0 )
nHsx := HS_INDEX( cFile, cExpr, nKeySize, nOpenMode, ;
@@ -175,7 +175,7 @@ FUNCTION HSX_OPEN( cFile, nBufSize )
IF !USED()
ELSEIF !RDDNAME() == "HSCDX"
ELSE
aWData:= USRRDD_AREADATA( SELECT() )
aWData := USRRDD_AREADATA( SELECT() )
nOpenMode := IIF( DBINFO( DBI_SHARED ), 1, 0 ) + ;
IIF( DBINFO( DBI_ISREADONLY ), 2, 0 )
nHsx := HS_OPEN( cFile, nBufSize, nOpenMode )
@@ -191,11 +191,11 @@ FUNCTION HSX_CLOSE( xHSX )
LOCAL aWData, nSlot
IF USED() .AND. RDDNAME() == "HSCDX"
aWData:= USRRDD_AREADATA( SELECT() )
aWData := USRRDD_AREADATA( SELECT() )
IF HB_ISNUMERIC( xHSX )
nSlot := ASCAN( aWData[ 2 ], xHSX )
ELSEIF HB_ISSTRING( xHSX )
nSlot := ASCAN( aWData[ 3 ], { |_1| _1 == xHSX } )
nSlot := ASCAN( aWData[ 3 ], {| _1 | _1 == xHSX } )
ELSE
nSlot := 0
ENDIF
@@ -213,8 +213,8 @@ FUNCTION HSX_HANDLE( cFile )
LOCAL aWData, nSlot
IF USED() .AND. RDDNAME() == "HSCDX"
aWData:= USRRDD_AREADATA( SELECT() )
nSlot := ASCAN( aWData[ 3 ], { |_1| _1 == cFile } )
aWData := USRRDD_AREADATA( SELECT() )
nSlot := ASCAN( aWData[ 3 ], {| _1 | _1 == cFile } )
IF nSlot != 0
RETURN aWData[ 2, nSlot ]
ENDIF
@@ -225,7 +225,7 @@ FUNCTION HSX_HANDLE( cFile )
FUNCTION HSX_FILE( nHsx )
LOCAL aWData, nSlot
IF USED() .AND. RDDNAME() == "HSCDX"
aWData:= USRRDD_AREADATA( SELECT() )
aWData := USRRDD_AREADATA( SELECT() )
nSlot := ASCAN( aWData[ 3 ], nHsx )
IF nSlot != 0
RETURN aWData[ 3, nSlot ]
@@ -236,7 +236,7 @@ FUNCTION HSX_FILE( nHsx )
FUNCTION HSX_GET( nSlot )
LOCAL aWData
IF USED() .AND. RDDNAME() == "HSCDX"
aWData:= USRRDD_AREADATA( SELECT() )
aWData := USRRDD_AREADATA( SELECT() )
IF nSlot > 0 .AND. nSlot <= LEN( aWData[ 2 ] )
RETURN aWData[ 2, nSlot ]
ENDIF

View File

@@ -110,7 +110,7 @@ STATIC FUNCTION RLCDX_LOCK( nWA, aLockInfo )
IF aWData[ 1 ] > 0
aLockInfo[ UR_LI_RESULT ] := .T.
RETURN HB_SUCCESS
ELSEIF ( i:= ASCAN( aWData[ 2 ], { |x| x[ 1 ] == xRecID } ) ) != 0
ELSEIF ( i := ASCAN( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) != 0
++aWData[ 2, i, 2 ]
aLockInfo[ UR_LI_RESULT ] := .T.
RETURN HB_SUCCESS
@@ -155,7 +155,7 @@ STATIC FUNCTION RLCDX_UNLOCK( nWA, xRecID )
LOCAL aWData := USRRDD_AREADATA( nWA ), i
IF HB_ISNUMERIC( xRecID ) .AND. xRecID > 0
IF ( i:= ASCAN( aWData[ 2 ], { |x| x[ 1 ] == xRecID } ) ) != 0
IF ( i := ASCAN( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) != 0
IF --aWData[ 2, i, 2 ] > 0
RETURN HB_SUCCESS
ENDIF
@@ -189,7 +189,7 @@ STATIC FUNCTION RLCDX_APPEND( nWA, lUnlockAll )
xRecId := RECNO()
/* Some RDDs may allow to set phantom locks with RLOCK so we should
check if it's not the case and increase the counter when it is */
IF ( i:= ASCAN( aWData[ 2 ], { |x| x[ 1 ] == xRecID } ) ) != 0
IF ( i := ASCAN( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) != 0
++aWData[ 2, i, 2 ]
ELSE
AADD( aWData[ 2 ], { xRecID, 1 } )

View File

@@ -54,9 +54,9 @@ FUNCTION TBrowseDB( nTop, nLeft, nBottom, nRight )
LOCAL oBrowse := TBrowseNew( nTop, nLeft, nBottom, nRight )
oBrowse:SkipBlock := { | nRecs | __dbSkipper( nRecs ) }
oBrowse:GoTopBlock := { || dbGoTop() }
oBrowse:GoBottomBlock := { || dbGoBottom() }
oBrowse:SkipBlock := {| nRecs | __dbSkipper( nRecs ) }
oBrowse:GoTopBlock := {|| dbGoTop() }
oBrowse:GoBottomBlock := {|| dbGoBottom() }
RETURN oBrowse

View File

@@ -87,7 +87,7 @@ FUNCTION Browse( nTop, nLeft, nBottom, nRight )
oBrw := TBrowseDB( nTop + 2, nLeft + 1, nBottom - 1, nRight - 1 )
oBrw:HeadSep := " " + Chr( 205 )
oBrw:SkipBlock := { | nRecs | Skipped( nRecs, lAppend ) }
oBrw:SkipBlock := {| nRecs | Skipped( nRecs, lAppend ) }
FOR n := 1 to FCount()
oBrw:AddColumn( TBColumnNew( FieldName( n ), FieldBlock( FieldName( n ) ) ) )
@@ -336,7 +336,7 @@ STATIC FUNCTION DoGet( oBrw, lAppend )
oCol := oBrw:GetColumn( oBrw:ColPos )
xValue := Eval( oCol:Block )
oGet := GetNew( Row(), Col(), ;
{ |xNewVal| iif( PCount() == 0, xValue, xValue := xNewVal ) }, ;
{| xNewVal | iif( PCount() == 0, xValue, xValue := xNewVal ) }, ;
"mGetVar", NIL, oBrw:ColorSpec )
lSuccess := .F.
IF ReadModal( { oGet } )

View File

@@ -50,6 +50,8 @@
*
*/
#include "directry.ch"
STATIC FUNCTION hb_doScan( cPath, cMask, cAttr, cPathSep )
LOCAL aFile
@@ -57,15 +59,15 @@ STATIC FUNCTION hb_doScan( cPath, cMask, cAttr, cPathSep )
LOCAL aResult := {}
FOR EACH aFile IN Directory( cPath + hb_osFileMask(), cAttr + "D" )
lMatch := hb_FileMatch( aFile[ 1 ], cMask )
IF "D" $ aFile[ 5 ]
lMatch := hb_FileMatch( aFile[ F_NAME ], cMask )
IF "D" $ aFile[ F_ATTR ]
IF lMatch .AND. "D" $ cAttr
AAdd( aResult, aFile )
ENDIF
IF !( aFile[ 1 ] == "." .OR. aFile[ 1 ] == ".." .OR. aFile[ 1 ] == "" )
AEval( hb_DoScan( cPath + aFile[ 1 ] + cPathSep, cMask, cAttr, cPathSep ), ;
{ |x| x[ 1 ] := aFile[ 1 ] + cPathSep + x[ 1 ], ;
AAdd( aResult, x ) } )
IF !( aFile[ F_NAME ] == "." .OR. aFile[ F_NAME ] == ".." .OR. aFile[ F_NAME ] == "" )
AEval( hb_DoScan( cPath + aFile[ F_NAME ] + cPathSep, cMask, cAttr, cPathSep ), ;
{| x | x[ F_NAME ] := aFile[ F_NAME ] + cPathSep + x[ F_NAME ], ;
AAdd( aResult, x ) } )
ENDIF
ELSEIF lMatch
AAdd( aResult, aFile )
@@ -82,7 +84,7 @@ FUNCTION hb_DirScan( cPath, cFileMask, cAttr )
cFilePath := ""
ELSE
cFilePath := cPath
IF !Right( cPath, 1 ) $ hb_osPathDelimiters()
IF ! Right( cPath, 1 ) $ hb_osPathDelimiters()
cFilePath += hb_ps()
ENDIF
ENDIF

View File

@@ -54,7 +54,7 @@
PROCEDURE ErrorSys()
ErrorBlock( { | oError | DefError( oError ) } )
ErrorBlock( {| oError | DefError( oError ) } )
RETURN

View File

@@ -355,12 +355,12 @@ FUNCTION hb_IniWriteStr( hIni, cCommentBegin, cCommentEnd, lAutoMain )
IF lAutoMain
/* When automain is on, write the main section */
hb_HEval( hIni[ "MAIN" ], ;
{ |cKey, xVal| cBuffer += hb_CStr( cKey ) + " = " + ;
{| cKey, xVal | cBuffer += hb_CStr( cKey ) + " = " + ;
hb_CStr( xVal ) + cNewLine } )
ELSE
/* When automain is off, just write all the toplevel variables. */
hb_HEval( hIni, { |cKey, xVal| iif( ! HB_ISHASH( xVal ),;
hb_HEval( hIni, {| cKey, xVal | iif( ! HB_ISHASH( xVal ),;
cBuffer += hb_CStr( cKey ) + " = " + ;
hb_CStr( xVal ) + cNewLine, /* nothing */ ) } )
ENDIF
@@ -383,8 +383,8 @@ FUNCTION hb_IniWriteStr( hIni, cCommentBegin, cCommentEnd, lAutoMain )
cBuffer += cNewLine + "[" + hb_CStr( cSection:__enumKey ) + "]" + cNewLine
hb_HEval( cSection, ;
{ |cKey, xVal| cBuffer += hb_CStr( cKey ) + "=" + ;
hb_CStr( xVal ) + cNewLine } )
{| cKey, xVal | cBuffer += hb_CStr( cKey ) + "=" + ;
hb_CStr( xVal ) + cNewLine } )
NEXT
IF HB_ISSTRING( cCommentEnd ) .AND. ! Empty( cCommentEnd )

View File

@@ -337,18 +337,18 @@ METHOD findText( cText, nPos, lCaseSensitive, lExact ) CLASS LISTBOX
IF lExact
cText := RTrim( cText )
IF lCaseSensitive
bSearch := { | aItem | RTrim( aItem[ _ITEM_cTEXT ] ) == cText }
bSearch := {| aItem | RTrim( aItem[ _ITEM_cTEXT ] ) == cText }
ELSE
cText := Lower( cText )
bSearch := { | aItem | Lower( RTrim( aItem[ _ITEM_cTEXT ] ) ) == cText }
bSearch := {| aItem | Lower( RTrim( aItem[ _ITEM_cTEXT ] ) ) == cText }
ENDIF
ELSE
nLen := Len( cText )
IF lCaseSensitive
bSearch := { | aItem | Left( aItem[ _ITEM_cTEXT ], nLen ) == cText }
bSearch := {| aItem | Left( aItem[ _ITEM_cTEXT ], nLen ) == cText }
ELSE
cText := Lower( cText )
bSearch := { | aItem | Lower( Left( aItem[ _ITEM_cTEXT ], nLen ) ) == cText }
bSearch := {| aItem | Lower( Left( aItem[ _ITEM_cTEXT ], nLen ) ) == cText }
ENDIF
ENDIF
@@ -381,18 +381,18 @@ METHOD findData( cData, nPos, lCaseSensitive, lExact ) CLASS LISTBOX
IF lExact
cData := RTrim( cData )
IF lCaseSensitive
bSearch := { | aItem | RTrim( _LISTBOX_ITEMDATA( aItem ) ) == cData }
bSearch := {| aItem | RTrim( _LISTBOX_ITEMDATA( aItem ) ) == cData }
ELSE
cData := Lower( cData )
bSearch := { | aItem | Lower( RTrim( _LISTBOX_ITEMDATA( aItem ) ) ) == cData }
bSearch := {| aItem | Lower( RTrim( _LISTBOX_ITEMDATA( aItem ) ) ) == cData }
ENDIF
ELSE
nLen := Len( cData )
IF lCaseSensitive
bSearch := { | aItem | Left( _LISTBOX_ITEMDATA( aItem ), nLen ) == cData }
bSearch := {| aItem | Left( _LISTBOX_ITEMDATA( aItem ), nLen ) == cData }
ELSE
cData := Lower( cData )
bSearch := { | aItem | Lower( Left( _LISTBOX_ITEMDATA( aItem ), nLen ) ) == cData }
bSearch := {| aItem | Lower( Left( _LISTBOX_ITEMDATA( aItem ), nLen ) ) == cData }
ENDIF
ENDIF

View File

@@ -443,7 +443,7 @@ STATIC PROCEDURE AddFriendClass( ... )
LOCAL Self := QSelf()
AEval( HB_AParams(), { | sClass | AAdd( ::asFriendClass, sClass ) } )
AEval( HB_AParams(), {| sClass | AAdd( ::asFriendClass, sClass ) } )
RETURN
@@ -451,7 +451,7 @@ STATIC PROCEDURE AddFriendFunc( ... )
LOCAL Self := QSelf()
AEval( HB_AParams(), { | sFunc | AAdd( ::asFriendFunc, sFunc ) } )
AEval( HB_AParams(), {| sFunc | AAdd( ::asFriendFunc, sFunc ) } )
RETURN

View File

@@ -189,7 +189,7 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
// Print the last band if there is one
IF ::lOneMoreBand
// Print the band
AEval( ::aBandToPrint, { | BandLine | PrintIt( BandLine ) } )
AEval( ::aBandToPrint, {| BandLine | PrintIt( BandLine ) } )
ENDIF
RECOVER USING xBreakVal
@@ -275,7 +275,7 @@ METHOD ExecuteLabel() CLASS HBLabelForm
::nCurrentCol := 1
// Print the band
AEval( ::aBandToPrint, { | BandLine | PrintIt( BandLine ) } )
AEval( ::aBandToPrint, {| BandLine | PrintIt( BandLine ) } )
nMoreLines := ::aLabelData[ LBL_HEIGHT ] - Len( ::aBandToPrint )
IF nMoreLines > 0
@@ -317,7 +317,7 @@ METHOD SampleLabels() CLASS HBLabelForm
DO WHILE lMoreSamples
// Print the samples
AEval( aBand, { | BandLine | PrintIt( BandLine ) } )
AEval( aBand, {| BandLine | PrintIt( BandLine ) } )
IF ::aLabelData[ LBL_LINES ] > 0
// Add the spaces between the label lines

View File

@@ -107,9 +107,9 @@ FUNCTION HBObject()
/*oClass:AddMultiData( , , HB_OO_CLSTP_EXPORTED, { "CLASS" }, .F. ) */
/*oClass:AddInline( "ADDMETHOD" , { | Self, cMeth, pFunc, nScopeMeth | __clsAddMsg( __CLASSH( Self ) , cMeth , pFunc ,HB_OO_MSG_METHOD , NIL, iif( nScopeMeth == NIL, 1, nScopeMeth ) ) }, HB_OO_CLSTP_EXPORTED ) */
/*oClass:AddInline( "ADDVAR" , { | Self, cVAR, nScopeMeth, uiData, hClass | __clsAddMsg( hClass:=__CLASSH( Self ) , cVar , uidata := __CLS_INCDATA( hClass ), HB_OO_MSG_ACCESS, NIL, iif( nScopeMeth == NIL, 1, nScopeMeth ) ) , ; */
/* __clsAddMsg( hClass , "_"+cVar , uiData , HB_OO_MSG_ASSIGN, NIL, iif( nScopeMeth == NIL, 1, nScopeMeth ) ) }, HB_OO_CLSTP_EXPORTED ) */
/*oClass:AddInline( "ADDMETHOD" , {| Self, cMeth, pFunc, nScopeMeth | __clsAddMsg( __CLASSH( Self ) , cMeth , pFunc ,HB_OO_MSG_METHOD , NIL, iif( nScopeMeth == NIL, 1, nScopeMeth ) ) }, HB_OO_CLSTP_EXPORTED ) */
/*oClass:AddInline( "ADDVAR" , {| Self, cVAR, nScopeMeth, uiData, hClass | __clsAddMsg( hClass:=__CLASSH( Self ) , cVar , uidata := __CLS_INCDATA( hClass ), HB_OO_MSG_ACCESS, NIL, iif( nScopeMeth == NIL, 1, nScopeMeth ) ) , ; */
/* __clsAddMsg( hClass , "_"+cVar , uiData , HB_OO_MSG_ASSIGN, NIL, iif( nScopeMeth == NIL, 1, nScopeMeth ) ) }, HB_OO_CLSTP_EXPORTED ) */
/* Those one exist within Class(y), so we will probably try to implement it */

View File

@@ -252,7 +252,7 @@ METHOD New( cFrmName AS STRING,;
BEGIN SEQUENCE
::aReportData := ::LoadReportFile( cFRMName ) // Load the frm into an array
::nMaxLinesAvail := ::aReportData[RPT_LINES]
::nMaxLinesAvail := ::aReportData[ RPT_LINES ]
// Modify ::aReportData based on the report parameters
IF lSummary // Set the summary only flag
@@ -293,8 +293,8 @@ METHOD New( cFrmName AS STRING,;
// Initialize ::aReportTotals to track both group and report totals, then
// set the column total elements to 0 if they are to be totaled, otherwise
// leave them NIL
::aReportTotals := Array( Len( ::aReportData[RPT_GROUPS] ) + 1, ;
Len( ::aReportData[RPT_COLUMNS] ) )
::aReportTotals := Array( Len( ::aReportData[ RPT_GROUPS ] ) + 1, ;
Len( ::aReportData[ RPT_COLUMNS ] ) )
// Column total elements
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
@@ -306,20 +306,20 @@ METHOD New( cFrmName AS STRING,;
NEXT
// Initialize ::aGroupTotals as an array
::aGroupTotals := Array( Len(::aReportData[RPT_GROUPS]) )
::aGroupTotals := Array( Len( ::aReportData[ RPT_GROUPS ] ) )
// Execute the actual report based on matching records
DBEval( {|| ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest )
// Generate any totals that may have been identified
// Make a pass through all the groups
FOR nGroup := Len(::aReportData[RPT_GROUPS]) TO 1 STEP -1
FOR nGroup := Len( ::aReportData[ RPT_GROUPS ] ) TO 1 STEP -1
// make sure group has subtotals
lAnySubTotals := .F.
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS])
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TOTAL]
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TOTAL ]
lAnySubTotals := .T.
EXIT // NOTE
ENDIF
@@ -341,21 +341,21 @@ METHOD New( cFrmName AS STRING,;
ENDIF
// Print the first line
::PrintIt( Space( ::aReportData[RPT_LMARGIN] ) + ;
::PrintIt( Space( ::aReportData[ RPT_LMARGIN ] ) + ;
iif( nGroup == 1, __NatMsg( _RFRM_SUBTOTAL ),;
__NatMsg( _RFRM_SUBSUBTOTAL ) ) )
// Print the second line
QQOut( Space(::aReportData[RPT_LMARGIN]) )
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS])
QQOut( Space( ::aReportData[ RPT_LMARGIN ] ) )
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
IF nCol > 1
QQOut( " " )
ENDIF
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TOTAL]
QQOut( Transform(::aReportTotals[nGroup+1,nCol], ;
::aReportData[RPT_COLUMNS,nCol,RCT_PICT]) )
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TOTAL ]
QQOut( Transform( ::aReportTotals[ nGroup + 1, nCol ], ;
::aReportData[ RPT_COLUMNS, nCol, RCT_PICT ] ) )
ELSE
QQOut( Space(::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH]) )
QQOut( Space( ::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] ) )
ENDIF
NEXT
@@ -366,8 +366,8 @@ METHOD New( cFrmName AS STRING,;
// Any report totals?
lAnyTotals := .F.
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS])
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TOTAL]
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TOTAL ]
lAnyTotals := .T.
EXIT
ENDIF
@@ -387,19 +387,19 @@ METHOD New( cFrmName AS STRING,;
ENDIF
// Print the first line
::PrintIt( Space(::aReportData[RPT_LMARGIN]) + __NatMsg(_RFRM_TOTAL ) )
::PrintIt( Space( ::aReportData[ RPT_LMARGIN ] ) + __NatMsg( _RFRM_TOTAL ) )
// Print the second line
QQOut( Space(::aReportData[RPT_LMARGIN]) )
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS])
QQOut( Space( ::aReportData[ RPT_LMARGIN ] ) )
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
IF nCol > 1
QQOut( " " )
ENDIF
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TOTAL]
QQOut( Transform(::aReportTotals[1,nCol], ;
::aReportData[RPT_COLUMNS,nCol,RCT_PICT]) )
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TOTAL ]
QQOut( Transform( ::aReportTotals[ 1, nCol ], ;
::aReportData[ RPT_COLUMNS, nCol, RCT_PICT ] ) )
ELSE
QQOut( Space(::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH]) )
QQOut( Space( ::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] ) )
ENDIF
NEXT nCol
@@ -468,21 +468,21 @@ METHOD ReportHeader() CLASS HBReportForm
LOCAL nLinesInHeader
LOCAL aPageHeader := {}
LOCAL nHeadingLength := ::aReportData[RPT_WIDTH] - ::aReportData[RPT_LMARGIN] -30
LOCAL nHeadingLength := ::aReportData[ RPT_WIDTH ] - ::aReportData[ RPT_LMARGIN ] - 30
LOCAL nCol, nLine, nMaxColLength, cHeader
LOCAL nHeadline
LOCAL nRPageSize
LOCAL aTempPgHeader
nRPageSize := ::aReportData[RPT_WIDTH] - ::aReportData[RPT_RMARGIN]
nRPageSize := ::aReportData[ RPT_WIDTH ] - ::aReportData[ RPT_RMARGIN ]
IF !::aReportData[RPT_PLAIN]
IF ::aReportData[RPT_HEADING] == ""
AAdd( aPageHeader,__NatMsg(_RFRM_PAGENO) + Str(::nPageNumber,6))
IF !::aReportData[ RPT_PLAIN ]
IF ::aReportData[ RPT_HEADING ] == ""
AAdd( aPageHeader, __NatMsg( _RFRM_PAGENO ) + Str( ::nPageNumber, 6 ) )
ELSE
aTempPgHeader:=ParseHeader( ::aReportData[RPT_HEADING],;
Occurs(";",::aReportData[RPT_HEADING]) +1 )
aTempPgHeader:=ParseHeader( ::aReportData[ RPT_HEADING ],;
Occurs( ";", ::aReportData[ RPT_HEADING ] ) + 1 )
FOR nLine := 1 to Len( aTempPgHeader)
nLinesInHeader:=Max( XMLCOUNT( LTrim( aTempPgHeader[ nLine ] ) , ;
@@ -490,28 +490,28 @@ METHOD ReportHeader() CLASS HBReportForm
FOR nHeadLine := 1 to nLinesInHeader
AAdd( aPageHeader, Space( 15 ) + ;
PadC( RTrim( XMEMOLINE( LTrim( aTempPgHeader[ nLine ]),;
nHeadingLength,nHeadLine)), nHeadingLength))
PadC( RTrim( XMEMOLINE( LTrim( aTempPgHeader[ nLine ] ),;
nHeadingLength, nHeadLine ) ), nHeadingLength ) )
NEXT nHeadLine
NEXT nLine
aPageHeader[ 1 ] := Stuff(aPageHeader[ 1 ], 1, 14, ;
__NatMsg(_RFRM_PAGENO)+Str(::nPageNumber,6))
__NatMsg( _RFRM_PAGENO ) + Str( ::nPageNumber, 6 ) )
ENDIF
AAdd( aPageHeader, DToC(Date()) )
AAdd( aPageHeader, DToC( Date() ) )
ENDIF
FOR nLine := 1 TO Len( ::aReportData[ RPT_HEADER])
nLinesInHeader := Max( XMLCOUNT(LTrim( ::aReportData[RPT_HEADER,;
nLine ] )),1 )
nLinesInHeader := Max( XMLCOUNT( LTrim( ::aReportData[ RPT_HEADER,;
nLine ] ) ), 1 )
FOR nHeadLine := 1 to nLinesInHeader
cHeader := RTrim( XMEMOLINE( LTrim( ::aReportData[RPT_HEADER, nLine ]),,;
nHeadLine))
AAdd( aPageHeader, Space((nRPageSize - ::aReportData[ RPT_LMARGIN ] -;
Len( cHeader ) ) / 2 ) + cHeader )
cHeader := RTrim( XMEMOLINE( LTrim( ::aReportData[ RPT_HEADER, nLine ] ),,;
nHeadLine ) )
AAdd( aPageHeader, Space( ( nRPageSize - ::aReportData[ RPT_LMARGIN ] -;
Len( cHeader ) ) / 2 ) + cHeader )
NEXT nHeadLine
@@ -521,34 +521,34 @@ METHOD ReportHeader() CLASS HBReportForm
nLinesInHeader := Len( aPageHeader)
nMaxColLength :=0
FOR nCol := 1 TO Len( ::aReportData[RPT_COLUMNS] )
nMaxColLength := Max(Len(::aReportData[RPT_COLUMNS,nCol,RCT_HEADER]), ;
nMaxColLength)
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
nMaxColLength := Max( Len( ::aReportData[ RPT_COLUMNS, nCol, RCT_HEADER ] ), ;
nMaxColLength )
NEXT
FOR nCol := 1 to Len( ::aReportData[RPT_COLUMNS] )
ASize( ::aReportData[RPT_COLUMNS,nCol,RCT_HEADER] ,nMaxColLength)
FOR nCol := 1 to Len( ::aReportData[ RPT_COLUMNS ] )
ASize( ::aReportData[ RPT_COLUMNS, nCol, RCT_HEADER ], nMaxColLength )
NEXT
FOR nLine:=1 TO nMaxColLength
AAdd( aPageHeader, "")
NEXT
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS]) // Cycle through the columns
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] ) // Cycle through the columns
FOR nLine := 1 TO nMaxColLength
IF nCol > 1
aPageHeader[ nLinesInHeader + nLine ] += " "
ENDIF
IF ::aReportData[RPT_COLUMNS,nCol,RCT_HEADER,nLine] == NIL
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_HEADER, nLine ] == NIL
aPageHeader[ nLinesInHeader + nLine ] += ;
Space( ::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH] )
Space( ::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] )
ELSE
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TYPE] == "N"
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TYPE ] == "N"
aPageHeader[ nLinesInHeader + nLine ] += ;
PadL(::aReportData[RPT_COLUMNS,nCol,RCT_HEADER,nLine],;
::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH])
PadL( ::aReportData[ RPT_COLUMNS, nCol, RCT_HEADER, nLine ],;
::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] )
ELSE
aPageHeader[ nLinesInHeader + nLine ] += ;
PadR(::aReportData[RPT_COLUMNS,nCol,RCT_HEADER,nLine],;
::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH])
PadR( ::aReportData[ RPT_COLUMNS, nCol, RCT_HEADER, nLine ],;
::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] )
ENDIF
ENDIF
NEXT
@@ -557,15 +557,15 @@ METHOD ReportHeader() CLASS HBReportForm
// Insert the two blank lines between the heading and the actual data
AAdd( aPageHeader, "" )
AAdd( aPageHeader, "" )
AEval( aPageHeader, { | HeaderLine | ;
::PrintIt( Space(::aReportData[RPT_LMARGIN])+ HeaderLine ) } )
AEval( aPageHeader, {| HeaderLine | ;
::PrintIt( Space( ::aReportData[ RPT_LMARGIN ] ) + HeaderLine ) } )
// Set the page number and number of available lines
::nPageNumber++
// adjust the line count to account for Summer '87 behavior
::nLinesLeft := ::aReportData[RPT_LINES] - Len( aPageHeader )
::nMaxLinesAvail := ::aReportData[RPT_LINES] - Len( aPageHeader )
::nLinesLeft := ::aReportData[ RPT_LINES ] - Len( aPageHeader )
::nMaxLinesAvail := ::aReportData[ RPT_LINES ] - Len( aPageHeader )
RETURN SELF
@@ -584,11 +584,11 @@ METHOD ExecuteReport() CLASS HBReportForm
LOCAL lAnySubTotals
// Add to the main column totals
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS])
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TOTAL]
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TOTAL ]
// If this column should be totaled, do it
::aReportTotals[ 1 ,nCol] += ;
Eval( ::aReportData[RPT_COLUMNS,nCol,RCT_EXP] )
::aReportTotals[ 1, nCol ] += ;
Eval( ::aReportData[ RPT_COLUMNS, nCol, RCT_EXP ] )
ENDIF
NEXT
@@ -618,9 +618,9 @@ METHOD ExecuteReport() CLASS HBReportForm
ENDIF
// For subgroup processing: check if group has been changed
IF MakeAStr(Eval(::aReportData[RPT_GROUPS, 1, RGT_EXP]),;
::aReportData[RPT_GROUPS, 1, RGT_TYPE]) != ::aGroupTotals[1]
lGroupChanged := .T.
IF MakeAStr( Eval( ::aReportData[ RPT_GROUPS, 1, RGT_EXP ] ),;
::aReportData[ RPT_GROUPS, 1, RGT_TYPE ] ) != ::aGroupTotals[ 1 ]
lGroupChanged := .T.
ENDIF
// If this (sub)group has changed since the last record
@@ -670,7 +670,7 @@ METHOD ExecuteReport() CLASS HBReportForm
ENDIF
AEval( aRecordHeader, { | HeaderLine | ;
AEval( aRecordHeader, {| HeaderLine | ;
::PrintIt( Space( ::aReportData[ RPT_LMARGIN ] ) + HeaderLine ) } )
aRecordHeader := {}
@@ -691,10 +691,10 @@ METHOD ExecuteReport() CLASS HBReportForm
// new group headers need to be generated
// Cycle through the groups
FOR nGroup := 1 TO Len(::aReportData[RPT_GROUPS])
FOR nGroup := 1 TO Len( ::aReportData[ RPT_GROUPS ] )
// If the group has changed
IF MakeAStr(Eval(::aReportData[RPT_GROUPS,nGroup,RGT_EXP]),;
::aReportData[RPT_GROUPS,nGroup,RGT_TYPE]) == ::aGroupTotals[nGroup]
IF MakeAStr( Eval( ::aReportData[ RPT_GROUPS, nGroup, RGT_EXP ] ),;
::aReportData[ RPT_GROUPS, nGroup, RGT_TYPE ] ) == ::aGroupTotals[ nGroup ]
ELSE
AAdd( aRecordHeader, "" ) // The blank line
@@ -709,9 +709,9 @@ METHOD ExecuteReport() CLASS HBReportForm
AAdd( aRecordHeader, iif( nGroup == 1, "** ", "* " ) +;
::aReportData[RPT_GROUPS,nGroup,RGT_HEADER] + " " +;
MakeAStr(Eval(::aReportData[RPT_GROUPS,nGroup,RGT_EXP]), ;
::aReportData[RPT_GROUPS,nGroup,RGT_TYPE]) )
::aReportData[ RPT_GROUPS, nGroup, RGT_HEADER ] + " " +;
MakeAStr( Eval( ::aReportData[ RPT_GROUPS, nGroup, RGT_EXP ] ), ;
::aReportData[ RPT_GROUPS, nGroup, RGT_TYPE ] ) )
ENDIF
NEXT
@@ -731,8 +731,8 @@ METHOD ExecuteReport() CLASS HBReportForm
ENDIF
// Send aRecordHeader to the output device, resetting nLinesLeft
AEval( aRecordHeader, { | HeaderLine | ;
::PrintIt( Space(::aReportData[RPT_LMARGIN])+ HeaderLine ) } )
AEval( aRecordHeader, {| HeaderLine | ;
::PrintIt( Space( ::aReportData[ RPT_LMARGIN ] ) + HeaderLine ) } )
::nLinesLeft -= Len( aRecordHeader )
@@ -748,36 +748,36 @@ METHOD ExecuteReport() CLASS HBReportForm
ENDIF
// Add to the group totals
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS])
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
// If this column should be totaled, do it
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TOTAL]
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TOTAL ]
// Cycle through the groups
FOR nGroup := 1 TO Len( ::aReportTotals ) - 1
::aReportTotals[nGroup+1,nCol] += ;
Eval( ::aReportData[RPT_COLUMNS,nCol,RCT_EXP] )
Eval( ::aReportData[ RPT_COLUMNS, nCol, RCT_EXP ] )
NEXT
ENDIF
NEXT
// Reset the group expressions in aGroupTotals
FOR nGroup := 1 TO Len(::aReportData[RPT_GROUPS])
::aGroupTotals[nGroup] := MakeAStr(Eval(::aReportData[RPT_GROUPS,nGroup,RGT_EXP]),;
::aReportData[RPT_GROUPS,nGroup,RGT_TYPE])
FOR nGroup := 1 TO Len( ::aReportData[ RPT_GROUPS ] )
::aGroupTotals[ nGroup ] := MakeAStr( Eval( ::aReportData[ RPT_GROUPS, nGroup, RGT_EXP ] ),;
::aReportData[ RPT_GROUPS, nGroup, RGT_TYPE ] )
NEXT
// Only run through the record detail if this is NOT a summary report
IF !::aReportData[ RPT_SUMMARY ]
// Determine the max number of lines needed by each expression
nMaxLines := 1
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS])
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TYPE] $ "M"
nMaxLines := Max(XMLCOUNT(Eval(::aReportData[RPT_COLUMNS,nCol,RCT_EXP]),;
::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH]), nMaxLines)
ELSEIF ::aReportData[RPT_COLUMNS,nCol,RCT_TYPE] $ "C"
nMaxLines := Max( XMLCOUNT( StrTran( Eval( ::aReportData[RPT_COLUMNS,nCol,RCT_EXP]),;
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TYPE ] $ "M"
nMaxLines := Max( XMLCOUNT( Eval( ::aReportData[ RPT_COLUMNS, nCol, RCT_EXP ] ),;
::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] ), nMaxLines )
ELSEIF ::aReportData[ RPT_COLUMNS, nCol, RCT_TYPE ] $ "C"
nMaxLines := Max( XMLCOUNT( StrTran( Eval( ::aReportData[ RPT_COLUMNS, nCol, RCT_EXP ] ),;
";", hb_eol() ),;
::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH]), nMaxLines)
::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] ), nMaxLines )
ENDIF
NEXT
@@ -787,28 +787,28 @@ METHOD ExecuteReport() CLASS HBReportForm
AFill( aRecordToPrint, "" )
// Load the current record into aRecordToPrint
FOR nCol := 1 TO Len(::aReportData[RPT_COLUMNS])
FOR nCol := 1 TO Len( ::aReportData[ RPT_COLUMNS ] )
FOR nLine := 1 TO nMaxLines
// Check to see if it's a memo or character
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TYPE] $ "CM"
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TYPE ] $ "CM"
// Load the current line of the current column into cLine
// with multi-lines per record ";"- method
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TYPE] $ "C"
cLine := XMEMOLINE( RTrim( StrTran( Eval(::aReportData[RPT_COLUMNS,nCol,RCT_EXP]),;
IF ::aReportData[ RPT_COLUMNS, nCol, RCT_TYPE ] $ "C"
cLine := XMEMOLINE( RTrim( StrTran( Eval( ::aReportData[ RPT_COLUMNS, nCol, RCT_EXP ] ),;
";", hb_eol() ) ),;
::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ], nLine )
ELSE
cLine := XMEMOLINE( RTrim( Eval( ::aReportData[ RPT_COLUMNS, nCol, RCT_EXP ] ) ),;
::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ], nLine )
ENDIF
cLine := PadR( cLine, ::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH] )
cLine := PadR( cLine, ::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] )
ELSE
IF nLine == 1
cLine := Transform(Eval(::aReportData[RPT_COLUMNS,nCol,RCT_EXP]),;
::aReportData[RPT_COLUMNS,nCol,RCT_PICT])
cLine := PadR( cLine, ::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH] )
cLine := Transform( Eval( ::aReportData[ RPT_COLUMNS, nCol, RCT_EXP ] ),;
::aReportData[ RPT_COLUMNS, nCol, RCT_PICT ] )
cLine := PadR( cLine, ::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] )
ELSE
cLine := Space( ::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH])
cLine := Space( ::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] )
ENDIF
ENDIF
// Add it to the existing report line
@@ -827,7 +827,7 @@ METHOD ExecuteReport() CLASS HBReportForm
// This record is HUGE! Break it up...
nLine := 1
DO WHILE nLine < Len( aRecordToPrint )
::PrintIt( Space(::aReportData[RPT_LMARGIN]) + aRecordToPrint[nLine] )
::PrintIt( Space( ::aReportData[ RPT_LMARGIN ] ) + aRecordToPrint[ nLine ] )
nLine++
::nLinesLeft--
IF ::nLinesLeft == 0
@@ -847,8 +847,8 @@ METHOD ExecuteReport() CLASS HBReportForm
::ReportHeader()
ENDIF
AEval( aRecordToPrint, ;
{ | RecordLine | ;
::PrintIt( Space(::aReportData[RPT_LMARGIN])+ RecordLine ) ;
{| RecordLine | ;
::PrintIt( Space( ::aReportData[ RPT_LMARGIN ] ) + RecordLine ) ;
} ;
)
::nLinesLeft -= Len( aRecordToPrint )
@@ -856,8 +856,8 @@ METHOD ExecuteReport() CLASS HBReportForm
ELSE
// Send aRecordToPrint to the output device, resetting ::nLinesLeft
AEval( aRecordToPrint, ;
{ | RecordLine | ;
::PrintIt( Space(::aReportData[RPT_LMARGIN])+ RecordLine ) ;
{| RecordLine | ;
::PrintIt( Space( ::aReportData[ RPT_LMARGIN ] ) + RecordLine ) ;
} ;
)
::nLinesLeft -= Len( aRecordToPrint )
@@ -1024,7 +1024,7 @@ METHOD LoadReportFile( cFrmFile AS STRING ) CLASS HBReportForm
// Page right margin (not used)
aReport[ RPT_RMARGIN ] := BIN2W( SubStr( cParamsBuff, RIGHT_MGRN_OFFSET, 2 ) )
nColCount := BIN2W(SubStr(cParamsBuff, COL_COUNT_OFFSET, 2))
nColCount := BIN2W( SubStr( cParamsBuff, COL_COUNT_OFFSET, 2 ) )
// Line spacing
// Spacing is 1, 2, or 3
@@ -1287,32 +1287,32 @@ METHOD GetColumn( cFieldsBuffer AS STRING, nOffset AS NUMERIC ) CLASS HBReportFo
LOCAL nPointer, aColumn[ RCT_COUNT ], cType, cExpr
// Column width
aColumn[ RCT_WIDTH ] := BIN2W(SubStr(cFieldsBuffer, nOffset + ;
FIELD_WIDTH_OFFSET, 2))
aColumn[ RCT_WIDTH ] := BIN2W( SubStr( cFieldsBuffer, nOffset + ;
FIELD_WIDTH_OFFSET, 2 ) )
// Total column?
aColumn[ RCT_TOTAL ] := iif(SubStr(cFieldsBuffer, nOffset + ;
FIELD_TOTALS_OFFSET, 1) $ "YyTt", .T., .F.)
aColumn[ RCT_TOTAL ] := iif( SubStr( cFieldsBuffer, nOffset + ;
FIELD_TOTALS_OFFSET, 1 ) $ "YyTt", .T., .F. )
// Decimals width
aColumn[ RCT_DECIMALS ] := BIN2W(SubStr(cFieldsBuffer, nOffset + ;
FIELD_DECIMALS_OFFSET, 2))
aColumn[ RCT_DECIMALS ] := BIN2W( SubStr( cFieldsBuffer, nOffset + ;
FIELD_DECIMALS_OFFSET, 2 ) )
// Offset (relative to FIELDS_OFFSET), 'point' to
// expression area via array OFFSETS[]
// Content expression
nPointer := BIN2W(SubStr(cFieldsBuffer, nOffset +;
FIELD_CONTENT_EXPR_OFFSET, 2))
nPointer := BIN2W( SubStr( cFieldsBuffer, nOffset +;
FIELD_CONTENT_EXPR_OFFSET, 2 ) )
aColumn[ RCT_TEXT ] := ::GetExpr( nPointer )
cExpr := aColumn[ RCT_TEXT ]
aColumn[ RCT_EXP ] := hb_macroBlock( cExpr )
// Header expression
nPointer := BIN2W(SubStr(cFieldsBuffer, nOffset +;
FIELD_HEADER_EXPR_OFFSET, 2))
nPointer := BIN2W( SubStr( cFieldsBuffer, nOffset +;
FIELD_HEADER_EXPR_OFFSET, 2 ) )
aColumn[ RCT_HEADER ] := ListAsArray(::GetExpr( nPointer ), ";")
aColumn[ RCT_HEADER ] := ListAsArray( ::GetExpr( nPointer ), ";" )
// Column picture
// Setup picture only if a database file is open
@@ -1322,7 +1322,7 @@ METHOD GetColumn( cFieldsBuffer AS STRING, nOffset AS NUMERIC ) CLASS HBReportFo
SWITCH cType
CASE "C"
CASE "M"
aColumn[ RCT_PICT ] := Replicate("X", aColumn[ RCT_WIDTH ])
aColumn[ RCT_PICT ] := Replicate("X", aColumn[ RCT_WIDTH ] )
EXIT
CASE "D"
aColumn[ RCT_PICT ] := "@D"
@@ -1332,14 +1332,14 @@ METHOD GetColumn( cFieldsBuffer AS STRING, nOffset AS NUMERIC ) CLASS HBReportFo
EXIT
CASE "N"
IF aColumn[ RCT_DECIMALS ] != 0
aColumn[ RCT_PICT ] := Replicate("9", aColumn[ RCT_WIDTH ] - aColumn[ RCT_DECIMALS ] -1) + "." + ;
Replicate("9", aColumn[ RCT_DECIMALS ])
aColumn[ RCT_PICT ] := Replicate( "9", aColumn[ RCT_WIDTH ] - aColumn[ RCT_DECIMALS ] -1 ) + "." + ;
Replicate( "9", aColumn[ RCT_DECIMALS ] )
ELSE
aColumn[ RCT_PICT ] := Replicate("9", aColumn[ RCT_WIDTH ])
aColumn[ RCT_PICT ] := Replicate( "9", aColumn[ RCT_WIDTH ] )
ENDIF
EXIT
CASE "L"
aColumn[ RCT_PICT ] := "@L" + Replicate("X",aColumn[ RCT_WIDTH ]-1)
aColumn[ RCT_PICT ] := "@L" + Replicate( "X", aColumn[ RCT_WIDTH ] - 1 )
EXIT
ENDSWITCH
ENDIF

View File

@@ -1041,7 +1041,8 @@ void hb_macroTextValue( PHB_ITEM pItem )
HB_DLL_MSG_NO_FUNC( "macroTextValue" );
}
return s_macroTextValue ? s_macroTextValue( pItem ) : NULL;
if( s_macroTextValue )
s_macroTextValue( pItem );
}
#endif /* HB_OS_WIN */

View File

@@ -92,7 +92,7 @@ FUNCTION DO_MTTES1()
hb_mutexSubscribe( mtxResults,, @nDigit )
AAdd( aResults, nDigit )
NEXT
aEval( aThreads, { |x| hb_threadJoin( x ) } )
aEval( aThreads, {| x | hb_threadJoin( x ) } )
nSum := 0
FOR EACH nDigit IN aResults
nSum += nDigit