diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 942653095c..67e97fc3d1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +19990613 16:35 CET Eddie Runia + * tests/working/strip.prg; tests/working/inherit.prg; + tests/working/dynobj.prg + Were also not transmitted. + 19990613 15:30 CET Eddie Runia * source/tools/debug.c; source/tools/stringp.prg Changes 1990612 08:00 were reverted ?? diff --git a/harbour/tests/working/dynobj.prg b/harbour/tests/working/dynobj.prg index 600a33b51f..cdaa3512fc 100644 --- a/harbour/tests/working/dynobj.prg +++ b/harbour/tests/working/dynobj.prg @@ -14,7 +14,7 @@ function Main() local nSeq QOut( "What methods are in the class :" ) - HBDebug( aoMethod( oForm ) ) + Debug( aoMethod( oForm ) ) /* Let's add an inline at run-time. Should already be possible */ @@ -24,7 +24,7 @@ function Main() {|self| ( ::nRight - ::nLeft ) * ( ::nBottom - ::nTop ) } ) QOut( "What methods are in the class :" ) - HBDebug( aoMethod( oForm ) ) + Debug( aoMethod( oForm ) ) QOut( "What is the Form area ?" ) QOut( oForm:CalcArea() ) @@ -34,7 +34,7 @@ function Main() oAddMethod( oForm, "Smile", @Smile() ) QOut( "What methods are in the class :" ) - HBDebug( aoMethod( oForm ) ) + Debug( aoMethod( oForm ) ) QOut( "Smile please " ) oForm:Smile() @@ -42,7 +42,7 @@ function Main() Pause() QOut( "Data items before" ) - HBDebug( oForm ) + Debug( oForm ) QOut( "Let's add an additional data item" ) @@ -51,7 +51,7 @@ function Main() oForm:cHelp := "This is a real tricky test" QOut( "Data items after" ) - HBDebug( oForm ) + Debug( oForm ) Pause() @@ -71,31 +71,31 @@ function Main() QOut( oForm:CalcArea() ) QOut( "What methods are in the class :" ) - HBDebug( aoMethod( oForm ) ) + Debug( aoMethod( oForm ) ) QOut( "Delete CalcArea" ) oDelInline( oForm, "CalcArea" ) QOut( "What methods are in the class :" ) - HBDebug( aoMethod( oForm ) ) + Debug( aoMethod( oForm ) ) QOut( "Delete Smile" ) oDelMethod( oForm, "Smile" ) QOut( "What methods are in the class :" ) - HBDebug( aoMethod( oForm ) ) + Debug( aoMethod( oForm ) ) Pause() QOut( "Data items before" ) - HBDebug( oForm ) + Debug( oForm ) QOut( "Let's delete cHelp" ) oDelData( oForm, "cHelp" ) QOut( "Data items after" ) - HBDebug( oForm ) + Debug( oForm ) /* oForm:cHelp := "Please crash" */ diff --git a/harbour/tests/working/inherit.prg b/harbour/tests/working/inherit.prg index 2417cdef71..9bbcaa9e40 100644 --- a/harbour/tests/working/inherit.prg +++ b/harbour/tests/working/inherit.prg @@ -20,11 +20,11 @@ function Main() oTo := TTextFile():New( "hello.out", "W" ) QOut( "What's in oFrom" ) - HBDebug( { oFrom, aoMethod( oFrom ) } ) + Debug( { oFrom, aoMethod( oFrom ) } ) QOut() QOut( "What's in oFrom:TEmpty" ) - HBDebug( { oFrom:TEmpty, aoMethod( oFrom:TEmpty ) } ) + Debug( { oFrom:TEmpty, aoMethod( oFrom:TEmpty ) } ) QOut() QOut( "Let's call Run() from TEmpty : " ) @@ -45,7 +45,7 @@ function Main() oFrom:Dispose() oTo:Dispose() -// HBDebug( __aGlobalStack() ) // Stack is OK! +// Debug( __aGlobalStack() ) // Stack is OK! return nil diff --git a/harbour/tests/working/strip.prg b/harbour/tests/working/strip.prg index 781589de22..f9e501990c 100644 --- a/harbour/tests/working/strip.prg +++ b/harbour/tests/working/strip.prg @@ -25,13 +25,13 @@ function Main( cFrom, cTo ) cTo := Default( cTo, "strip.out" ) oFrom := TTextFile() -// HBDebug( aoMethod( oFrom ) ) +// Debug( aoMethod( oFrom ) ) oFrom:New( cFrom, "R" ) oTo := TTextFile() -// HBDebug( aoMethod( oTo ) ) +// Debug( aoMethod( oTo ) ) oTo:New( cTo , "W" ) - do while !oFrom:lEoF + do while !oFrom:EoF() cOut := oFrom:Run() if alltrim(cOut) != "" oTo:Run( cOut ) @@ -64,14 +64,17 @@ function TTextFile() // Parameter = dirty // R = read, W = write oFile:AddMethod( "New" , @New() ) // Constructor - oFile:AddMethod( "Run" , @Run() ) // Get/set data oFile:AddMethod( "Dispose", @Dispose() ) // Clean up code oFile:AddMethod( "Read" , @Read() ) // Read line oFile:AddMethod( "WriteLn", @WriteLn() ) // Write line - oFile:AddMethod( "Write" , @Write() ) // Write without CR -// oFile:AddMethod( "EoF" , @EoF() ) // End of file as function oFile:AddMethod( "Goto" , @Goto() ) // Go to line + oFile:AddInline( "Run" , ; // Get/set data + {|self,xTxt,lCRLF|If( ::cMode == "R",::Read(),::WriteLn(xTxt, lCRLF)) } ) + oFile:AddInline( "Write" , {|self, xTxt|::WriteLn( xTxt, .F. ) } ) + // Write without CR + oFile:AddInline( "EoF" , {|self|::lEoF} ) + // End of file as function oFile:Create() endif return oFile:Instance() @@ -112,19 +115,6 @@ function New( cFileName, cMode, nBlock ) return self -function Run( xTxt, lCRLF ) - - local self := QSelf() - local xRet - - if ::cMode == "R" - xRet := ::Read() - else - xRet := ::WriteLn( xTxt, lCRLF ) - endif -return xRet - - // // Dispose -> Close the file handle // @@ -228,19 +218,6 @@ function WriteLn( xTxt, lCRLF ) return self -function Write( xTxt ) - - local self := QSelf() - -return ::WriteLn( xTxt, .F. ) - - -//function EoF() -// -// local self := QSelf() -//return ::lEoF - - // // Go to a specified line number //