2008-10-14 20:36 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/dbedit.prg
* source/rtl/tgetint.prg
* source/rtl/tlabel.prg
* source/rtl/treport.prg
* Changed '&( "{||" + c + "}" )' expressions to
hb_macroBlock() calls.
To me these places seemed safe to change, but
please verify me.
* source/rtl/alert.prg
* source/rtl/tbcolumn.prg
* source/rtl/tget.prg
* Minor formatting.
This commit is contained in:
@@ -8,6 +8,21 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2008-10-14 20:36 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* source/rtl/dbedit.prg
|
||||
* source/rtl/tgetint.prg
|
||||
* source/rtl/tlabel.prg
|
||||
* source/rtl/treport.prg
|
||||
* Changed '&( "{||" + c + "}" )' expressions to
|
||||
hb_macroBlock() calls.
|
||||
To me these places seemed safe to change, but
|
||||
please verify me.
|
||||
|
||||
* source/rtl/alert.prg
|
||||
* source/rtl/tbcolumn.prg
|
||||
* source/rtl/tget.prg
|
||||
* Minor formatting.
|
||||
|
||||
2008-10-14 19:23 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* include/hbextern.ch
|
||||
+ Added hb_macroBlock()
|
||||
|
||||
@@ -92,7 +92,7 @@ FUNCTION Alert( xMessage, aOptions, cColorNorm, nDelay )
|
||||
CASE ValType( xMessage ) == "L" ; cMessage := iif( xMessage, ".T.", ".F." )
|
||||
CASE ValType( xMessage ) == "O" ; cMessage := xMessage:className + " Object"
|
||||
CASE ValType( xMessage ) == "S" ; cMessage := "@" + xMessage:Name + "()"
|
||||
CASE ValType( xMessage ) == "B" ; cMessage := "{||...}"
|
||||
CASE ValType( xMessage ) == "B" ; cMessage := "{|| ... }"
|
||||
OTHERWISE ; cMessage := "NIL"
|
||||
ENDCASE
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ FUNCTION DBEDIT( nTop, nLeft, nBottom, nRight, ;
|
||||
creating codeblocks which are able to _assign_ values, as dbEdit()
|
||||
is a read-only function. [vszakats] */
|
||||
|
||||
bBlock := iif( Type( cBlock ) == "M", {|| " <Memo> " }, &( "{||" + cBlock + "}" ) )
|
||||
bBlock := iif( Type( cBlock ) == "M", {|| " <Memo> " }, hb_macroBlock( cBlock ) )
|
||||
|
||||
/* ; */
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
and there is no public class function like TBColumn(). There is
|
||||
in XPP though. */
|
||||
|
||||
#if defined(HB_C52_STRICT) && !defined(HB_COMPAT_XPP)
|
||||
#if defined( HB_C52_STRICT ) && !defined( HB_COMPAT_XPP )
|
||||
CREATE CLASS TBColumn STATIC
|
||||
#else
|
||||
CREATE CLASS TBColumn
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
and there is no public class function like Get(). There is
|
||||
in XPP though. */
|
||||
|
||||
#if defined(HB_C52_STRICT) && !defined(HB_COMPAT_XPP)
|
||||
#if defined( HB_C52_STRICT ) && !defined( HB_COMPAT_XPP )
|
||||
CREATE CLASS Get STATIC
|
||||
#else
|
||||
CREATE CLASS Get
|
||||
|
||||
@@ -71,11 +71,11 @@ FUNCTION __GET( bSetGet, cVarName, cPicture, bValid, bWhen )
|
||||
|
||||
IF bSetGet == NIL
|
||||
IF FieldPos( cVarName ) > 0
|
||||
bSetGet := &( "{|| iif( PCount()==0, FIELD->" + cVarName + ", FIELD->" + cVarName + " := hb_PValue(1) ) }" )
|
||||
bSetGet := hb_macroBlock( "iif(PCount()==0,FIELD->" + cVarName + ",FIELD->" + cVarName + ":=hb_PValue(1))" )
|
||||
ELSEIF __MVEXIST( cVarName )
|
||||
bSetGet := {|_1| iif( _1 == NIL, __MVGET( cVarName ), __MVPUT( cVarName, _1 ) ) }
|
||||
bSetGet := {| _1 | iif( _1 == NIL, __MVGET( cVarName ), __MVPUT( cVarName, _1 ) ) }
|
||||
ELSE
|
||||
bSetGet := &( "{|| iif( PCount()==0, " + cVarName + ", " + cVarName + " := hb_PValue(1) ) }" )
|
||||
bSetGet := hb_macroBlock( "iif(PCount()==0," + cVarName + "," + cVarName + ":=hb_PValue(1))" )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -92,11 +92,11 @@ FUNCTION __GETA( bGetArray, cVarName, cPicture, bValid, bWhen, aIndex )
|
||||
|
||||
IF bGetArray == NIL
|
||||
IF FieldPos( cVarName ) > 0
|
||||
bGetArray := &( "{|| FIELD->" + cVarName + "}" )
|
||||
bGetArray := hb_macroBlock( "FIELD->" + cVarName )
|
||||
ELSEIF __MVEXIST( cVarName )
|
||||
bGetArray := {|| __MVGET( cVarName ) }
|
||||
ELSE
|
||||
bGetArray := &( "{|| " + cVarName + "}" )
|
||||
bGetArray := hb_macroBlock( cVarName )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ METHOD New( cLBLName, lPrinter, cAltFile, lNoConsole, bFor, ;
|
||||
ENDIF
|
||||
|
||||
// Execute the actual label run based on matching records
|
||||
DBEval( { || ::ExecuteLabel() }, bFor, bWhile, nNext, nRecord, lRest )
|
||||
DBEval( {|| ::ExecuteLabel() }, bFor, bWhile, nNext, nRecord, lRest )
|
||||
|
||||
// Print the last band if there is one
|
||||
IF ::lOneMoreBand
|
||||
@@ -436,7 +436,7 @@ METHOD LoadLabel( cLblFile ) CLASS HBLabelForm
|
||||
AAdd( aLabel[ LBL_FIELDS ], {} )
|
||||
|
||||
// Field expression
|
||||
AAdd( aLabel[ LBL_FIELDS, i ], &( "{ || " + cFieldText + "}" ) )
|
||||
AAdd( aLabel[ LBL_FIELDS, i ], hb_macroBlock( cFieldText ) )
|
||||
|
||||
// Text of field
|
||||
AAdd( aLabel[ LBL_FIELDS, i ], cFieldText )
|
||||
|
||||
@@ -300,7 +300,7 @@ METHOD New( cFrmName, lPrinter, cAltFile, lNoConsole, bFor, bWhile, nNext, nReco
|
||||
::aGroupTotals := Array( Len(::aReportData[RPT_GROUPS]) )
|
||||
|
||||
// Execute the actual report based on matching records
|
||||
DBEval( { || ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest )
|
||||
DBEval( {|| ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest )
|
||||
|
||||
// Generate any totals that may have been identified
|
||||
// Make a pass through all the groups
|
||||
@@ -1073,7 +1073,7 @@ METHOD LoadReportFile( cFrmFile ) CLASS HBReportForm
|
||||
|
||||
// Group expression
|
||||
aReport[ RPT_GROUPS ][ 1 ][ RGT_TEXT ] := cGroupExp
|
||||
aReport[ RPT_GROUPS ][ 1 ][ RGT_EXP ] := &( "{ || " + cGroupExp + "}" )
|
||||
aReport[ RPT_GROUPS ][ 1 ][ RGT_EXP ] := hb_macroBlock( cGroupExp )
|
||||
IF Used()
|
||||
aReport[ RPT_GROUPS ][ 1 ][ RGT_TYPE ] := ;
|
||||
ValType( Eval( aReport[ RPT_GROUPS ][ 1 ][ RGT_EXP ] ) )
|
||||
@@ -1099,7 +1099,7 @@ METHOD LoadReportFile( cFrmFile ) CLASS HBReportForm
|
||||
|
||||
// Subgroup expression
|
||||
aReport[ RPT_GROUPS ][ 2 ][ RGT_TEXT ] := cSubGroupExp
|
||||
aReport[ RPT_GROUPS ][ 2 ][ RGT_EXP ] := &( "{ || " + cSubGroupExp + "}" )
|
||||
aReport[ RPT_GROUPS ][ 2 ][ RGT_EXP ] := hb_macroBlock( cSubGroupExp )
|
||||
IF Used()
|
||||
aReport[ RPT_GROUPS ][ 2 ][ RGT_TYPE ] := ;
|
||||
ValType( Eval( aReport[ RPT_GROUPS ][ 2 ][ RGT_EXP ] ) )
|
||||
@@ -1296,7 +1296,7 @@ METHOD GetColumn( cFieldsBuffer, nOffset ) CLASS HBReportForm
|
||||
FIELD_CONTENT_EXPR_OFFSET, 2))
|
||||
aColumn[ RCT_TEXT ] := ::GetExpr( nPointer )
|
||||
cExpr := aColumn[ RCT_TEXT ]
|
||||
aColumn[ RCT_EXP ] := &( "{ || " + cExpr + "}" )
|
||||
aColumn[ RCT_EXP ] := hb_macroBlock( cExpr )
|
||||
|
||||
// Header expression
|
||||
nPointer := BIN2W(SubStr(cFieldsBuffer, nOffset +;
|
||||
|
||||
Reference in New Issue
Block a user