diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6d240a012e..422355b2ca 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-15 04:42 UTC+0200 Viktor Szakats (harbour syenar.net) + * extras/guestbk/inifiles.prg + * extras/guestbk/testcgi.prg + * tests/inifiles.prg + * tests/stripem.prg + * tests/testhtml.prg + + changed low-level class creation to hbclass.ch one + + * extras/guestbk/guestbk.hbp + * minor + 2012-10-15 04:12 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/tests/activex.prg * contrib/gtwvg/tests/demowvg.prg diff --git a/harbour/extras/guestbk/guestbk.hbp b/harbour/extras/guestbk/guestbk.hbp index 34890fa05c..9e1ee7a35f 100644 --- a/harbour/extras/guestbk/guestbk.hbp +++ b/harbour/extras/guestbk/guestbk.hbp @@ -2,4 +2,6 @@ # $Id$ # -guestbk.prg inifiles.prg testcgi.prg +guestbk.prg +inifiles.prg +testcgi.prg diff --git a/harbour/extras/guestbk/inifiles.prg b/harbour/extras/guestbk/inifiles.prg index 299b57f0eb..d2d74afbc6 100644 --- a/harbour/extras/guestbk/inifiles.prg +++ b/harbour/extras/guestbk/inifiles.prg @@ -3,40 +3,32 @@ */ #include "fileio.ch" +#include "hbclass.ch" -FUNCTION TIniFile() +CREATE CLASS TIniFile - STATIC oClass + VAR FileName + VAR Contents - IF oClass == NIL - oClass := HBClass():New( "TINIFILE" ) // starts a new class definition + METHOD New( cFileName ) + METHOD ReadString( cSection, cIdent, cDefault ) + METHOD WriteString( cSection, cIdent, cString ) + METHOD ReadNumber( cSection, cIdent, nDefault ) + METHOD WriteNumber( cSection, cIdent, nNumber ) + METHOD ReadDate( cSection, cIdent, dDefault ) + METHOD WriteDate( cSection, cIdent, dDate ) + METHOD ReadBool( cSection, cIdent, lDefault ) + METHOD WriteBool( cSection, cIdent, lBool ) + METHOD DeleteKey( cSection, cIdent ) + METHOD EraseSection( cSection ) + METHOD ReadSection( cSection ) + METHOD ReadSections() + METHOD UpdateFile() - oClass:AddData( "FileName" ) // define this class objects datas - oClass:AddData( "Contents" ) +END CLASS - oClass:AddMethod( "New", @New() ) // define this class objects methods - oClass:AddMethod( "ReadString", @ReadString() ) - oClass:AddMethod( "WriteString", @WriteString() ) - oClass:AddMethod( "ReadNumber", @ReadNumber() ) - oClass:AddMethod( "WriteNumber", @WriteNumber() ) - oClass:AddMethod( "ReadDate", @ReadDate() ) - oClass:AddMethod( "WriteDate", @WriteDate() ) - oClass:AddMethod( "ReadBool", @ReadBool() ) - oClass:AddMethod( "WriteBool", @WriteBool() ) - oClass:AddMethod( "ReadSection", @ReadSection() ) - oClass:AddMethod( "ReadSections", @ReadSections() ) - oClass:AddMethod( "DeleteKey", @DeleteKey() ) - oClass:AddMethod( "EraseSection", @EraseSection() ) - oClass:AddMethod( "UpdateFile", @UpdateFile() ) +METHOD New( cFileName ) CLASS TIniFile - oClass:Create() // builds this class - ENDIF - - RETURN oClass:Instance() // builds an object of this class - -STATIC FUNCTION New( cFileName ) - - LOCAL Self := QSelf() LOCAL Done, hFile, cFile, cLine, cIdent, nPos LOCAL CurrArray @@ -111,9 +103,8 @@ STATIC FUNCTION New( cFileName ) RETURN Self -STATIC FUNCTION ReadString( cSection, cIdent, cDefault ) +METHOD ReadString( cSection, cIdent, cDefault ) CLASS TIniFile - LOCAL Self := QSelf() LOCAL cResult := cDefault LOCAL i, j, cFind @@ -141,9 +132,8 @@ STATIC FUNCTION ReadString( cSection, cIdent, cDefault ) RETURN cResult -STATIC PROCEDURE WriteString( cSection, cIdent, cString ) +METHOD PROCEDURE WriteString( cSection, cIdent, cString ) CLASS TIniFile - LOCAL Self := QSelf() LOCAL i, j, cFind IF Empty( cIdent ) @@ -180,52 +170,40 @@ STATIC PROCEDURE WriteString( cSection, cIdent, cString ) RETURN -STATIC FUNCTION ReadNumber( cSection, cIdent, nDefault ) - - LOCAL Self := QSelf() +METHOD ReadNumber( cSection, cIdent, nDefault ) CLASS TIniFile RETURN Val( ::ReadString( cSection, cIdent, Str(nDefault ) ) ) -STATIC PROCEDURE WriteNumber( cSection, cIdent, nNumber ) - - LOCAL Self := QSelf() +METHOD PROCEDURE WriteNumber( cSection, cIdent, nNumber ) CLASS TIniFile ::WriteString( cSection, cIdent, hb_ntos( nNumber ) ) RETURN -STATIC FUNCTION ReadDate( cSection, cIdent, dDefault ) - - LOCAL Self := QSelf() +METHOD ReadDate( cSection, cIdent, dDefault ) CLASS TIniFile RETURN SToD( ::ReadString( cSection, cIdent, DToS( dDefault ) ) ) -STATIC PROCEDURE WriteDate( cSection, cIdent, dDate ) - - LOCAL Self := QSelf() +METHOD PROCEDURE WriteDate( cSection, cIdent, dDate ) CLASS TIniFile ::WriteString( cSection, cIdent, DToS( dDate ) ) RETURN -STATIC FUNCTION ReadBool( cSection, cIdent, lDefault ) +METHOD ReadBool( cSection, cIdent, lDefault ) CLASS TIniFile - LOCAL Self := QSelf() LOCAL cDefault := iif( lDefault, ".t.", ".f." ) RETURN ::ReadString( cSection, cIdent, cDefault ) == ".t." -STATIC PROCEDURE WriteBool( cSection, cIdent, lBool ) - - LOCAL Self := QSelf() +METHOD PROCEDURE WriteBool( cSection, cIdent, lBool ) CLASS TIniFile ::WriteString( cSection, cIdent, iif( lBool, ".t.", ".f." ) ) RETURN -STATIC PROCEDURE DeleteKey( cSection, cIdent ) +METHOD PROCEDURE DeleteKey( cSection, cIdent ) CLASS TIniFile - LOCAL Self := QSelf() LOCAL i, j cSection := Lower( cSection ) @@ -240,9 +218,8 @@ STATIC PROCEDURE DeleteKey( cSection, cIdent ) RETURN -STATIC PROCEDURE EraseSection( cSection ) +METHOD PROCEDURE EraseSection( cSection ) CLASS TIniFile - LOCAL Self := QSelf() LOCAL i IF Empty( cSection ) @@ -259,9 +236,8 @@ STATIC PROCEDURE EraseSection( cSection ) RETURN -STATIC FUNCTION ReadSection( cSection ) +METHOD ReadSection( cSection ) CLASS TIniFile - LOCAL Self := QSelf() LOCAL i, j, aSection := {} IF Empty( cSection ) @@ -286,9 +262,8 @@ STATIC FUNCTION ReadSection( cSection ) RETURN aSection -STATIC FUNCTION ReadSections() +METHOD ReadSections() CLASS TIniFile - LOCAL Self := QSelf() LOCAL i, aSections := {} FOR i := 1 TO Len( ::Contents ) @@ -300,9 +275,8 @@ STATIC FUNCTION ReadSections() RETURN aSections -STATIC PROCEDURE UpdateFile() +METHOD PROCEDURE UpdateFile() CLASS TIniFile - LOCAL Self := QSelf() LOCAL i, j, hFile hFile := FCreate( ::Filename ) diff --git a/harbour/extras/guestbk/testcgi.prg b/harbour/extras/guestbk/testcgi.prg index 6fb1c5269f..a564f8c771 100644 --- a/harbour/extras/guestbk/testcgi.prg +++ b/harbour/extras/guestbk/testcgi.prg @@ -22,6 +22,7 @@ **/ #include "fileio.ch" +#include "hbclass.ch" #include "cgi.ch" @@ -51,78 +52,37 @@ FUNCTION ParseString( cString, cDelim, nRet ) RETURN aElem[ nRet ] -FUNCTION Hex2Dec( cHex ) +CREATE CLASS THTML - LOCAL aHex := {; - { "0", 00 }, ; - { "1", 01 }, ; - { "2", 02 }, ; - { "3", 03 }, ; - { "4", 04 }, ; - { "5", 05 }, ; - { "6", 06 }, ; - { "7", 07 }, ; - { "8", 08 }, ; - { "9", 09 }, ; - { "A", 10 }, ; - { "B", 11 }, ; - { "C", 12 }, ; - { "D", 13 }, ; - { "E", 14 }, ; - { "F", 15 } } - LOCAL nRet - LOCAL nRes + VAR cTitle // Page Title + VAR cBody // HTML Body Handler + VAR cBGColor // Background Color + VAR cLinkColor // Link Color + VAR cvLinkColor // Visited Link Color + VAR cContent // Page Content Handler - nRet := AScan( aHex, {| x | Upper( x[ 1 ] ) == Upper( Left( cHex, 1 ) ) } ) - nRes := aHex[ nRet, 2 ] * 16 - nRet := AScan( aHex, {| x | Upper( x[ 1 ] ) == Upper( Right( cHex, 1 ) ) } ) - nRes += aHex[ nRet, 2 ] + VAR aCGIContents + VAR aQueryFields + VAR cHTMLFile + VAR aReplaceTags - RETURN nRes + METHOD New() + METHOD SetTitle( cTitle ) + METHOD AddLink( cLinkTo, cLinkName ) + METHOD AddHead( cDescr ) + METHOD AddPara( cPara, cAlign ) + METHOD Generate() + METHOD ShowResult() + METHOD SaveToFile( cFile ) + METHOD ProcessCGI() + METHOD GetCGIParam( nParam ) + METHOD QueryFields( cQueryName ) + METHOD SetHTMLFile( cFile ) + METHOD AddReplaceTag( cTag, cReplaceText ) -FUNCTION THTML() +END CLASS - STATIC oClass - - IF oClass == NIL - oClass := HBClass():New( "THTML" ) - - oClass:AddData( "cTitle" ) // Page Title - oClass:AddData( "cBody" ) // HTML Body Handler - oClass:AddData( "cBGColor" ) // Background Color - oClass:AddData( "cLinkColor" ) // Link Color - oClass:AddData( "cvLinkColor" ) // Visited Link Color - oClass:AddData( "cContent" ) // Page Content Handler - - oClass:AddData( "aCGIContents" ) - oClass:AddData( "aQueryFields" ) - oClass:AddData( "cHTMLFile" ) - oClass:AddData( "aReplaceTags" ) - - oClass:AddMethod( "New", @New() ) // New Method - oClass:AddMethod( "SetTitle", @SetTitle() ) // Set Page Title - oClass:AddMethod( "AddHead", @AddHead() ) // Add
" + hb_eol() + ;
@@ -173,9 +125,8 @@ STATIC FUNCTION AddPara( cPara, cAlign )
RETURN Self
-STATIC FUNCTION Generate()
+METHOD Generate() CLASS THTML
- LOCAL Self := QSelf()
LOCAL cFile, i, hFile, nPos, cRes := ""
LOCAL lFlag := .F.
@@ -241,9 +192,7 @@ STATIC FUNCTION Generate()
RETURN Self
-STATIC FUNCTION ShowResult()
-
- LOCAL Self := QSelf()
+METHOD ShowResult() CLASS THTML
OutStd( ;
"HTTP/1.0 200 OK" + hb_eol() + ;
@@ -252,9 +201,8 @@ STATIC FUNCTION ShowResult()
RETURN Self
-STATIC FUNCTION SaveToFile( cFile )
+METHOD SaveToFile( cFile ) CLASS THTML
- LOCAL Self := QSelf()
LOCAL hFile := FCreate( cFile )
FWrite( hFile, ::cContent )
@@ -262,9 +210,8 @@ STATIC FUNCTION SaveToFile( cFile )
RETURN Self
-STATIC FUNCTION ProcessCGI()
+METHOD ProcessCGI() CLASS THTML
- LOCAL Self := QSelf()
LOCAL cQuery := ""
LOCAL cBuff := ""
LOCAL nBuff := 0
@@ -311,7 +258,7 @@ STATIC FUNCTION ProcessCGI()
cBuff := ""
ELSE
IF SubStr( cQuery, i, 1 ) == "%"
- cBuff += Chr( Hex2Dec( SubStr( cQuery, i + 1, 2 ) ) )
+ cBuff += Chr( hb_HexToNum( SubStr( cQuery, i + 1, 2 ) ) )
nBuff := 3
ENDIF
@@ -330,9 +277,7 @@ STATIC FUNCTION ProcessCGI()
RETURN Self
-STATIC FUNCTION GetCGIParam( nParam )
-
- LOCAL Self := QSelf()
+METHOD GetCGIParam( nParam ) CLASS THTML
::ProcessCGI()
@@ -343,9 +288,8 @@ STATIC FUNCTION GetCGIParam( nParam )
RETURN ::aCGIContents[nParam]
-STATIC FUNCTION QueryFields( cQueryName )
+METHOD QueryFields( cQueryName ) CLASS THTML
- LOCAL Self := QSelf()
LOCAL cRet := ""
LOCAL nRet
@@ -360,17 +304,13 @@ STATIC FUNCTION QueryFields( cQueryName )
RETURN cRet
-STATIC FUNCTION SetHTMLFile( cFile )
-
- LOCAL Self := QSelf()
+METHOD SetHTMLFile( cFile ) CLASS THTML
::cHTMLFile := cFile
RETURN Self
-STATIC FUNCTION AddReplaceTag( cTag, cReplaceText )
-
- LOCAL Self := QSelf()
+METHOD AddReplaceTag( cTag, cReplaceText ) CLASS THTML
AAdd( ::aReplaceTags, { cTag, cReplaceText } )
diff --git a/harbour/tests/inifiles.prg b/harbour/tests/inifiles.prg
index 8dd1ce13ac..d67e89fa34 100644
--- a/harbour/tests/inifiles.prg
+++ b/harbour/tests/inifiles.prg
@@ -3,6 +3,7 @@
*/
#include "fileio.ch"
+#include "hbclass.ch"
PROCEDURE Main( cFilename, cSection )
@@ -33,39 +34,30 @@ PROCEDURE Main( cFilename, cSection )
RETURN
-FUNCTION TIniFile()
+CREATE CLASS TIniFile
- STATIC oClass
+ VAR FileName
+ VAR Contents
- IF oClass == NIL
- oClass := HBClass():New( "TINIFILE" ) // starts a new class definition
+ METHOD New( cFileName )
+ METHOD ReadString( cSection, cIdent, cDefault )
+ METHOD WriteString( cSection, cIdent, cString )
+ METHOD ReadNumber( cSection, cIdent, nDefault )
+ METHOD WriteNumber( cSection, cIdent, nNumber )
+ METHOD ReadDate( cSection, cIdent, dDefault )
+ METHOD WriteDate( cSection, cIdent, dDate )
+ METHOD ReadBool( cSection, cIdent, lDefault )
+ METHOD WriteBool( cSection, cIdent, lBool )
+ METHOD DeleteKey( cSection, cIdent )
+ METHOD EraseSection( cSection )
+ METHOD ReadSection( cSection )
+ METHOD ReadSections()
+ METHOD UpdateFile()
- oClass:AddData( "FileName" ) // define this class objects datas
- oClass:AddData( "Contents" )
+END CLASS
- oClass:AddMethod( "New", @New() ) // define this class objects methods
- oClass:AddMethod( "ReadString", @ReadString() )
- oClass:AddMethod( "WriteString", @WriteString() )
- oClass:AddMethod( "ReadNumber", @ReadNumber() )
- oClass:AddMethod( "WriteNumber", @WriteNumber() )
- oClass:AddMethod( "ReadDate", @ReadDate() )
- oClass:AddMethod( "WriteDate", @WriteDate() )
- oClass:AddMethod( "ReadBool", @ReadBool() )
- oClass:AddMethod( "WriteBool", @WriteBool() )
- oClass:AddMethod( "ReadSection", @ReadSection() )
- oClass:AddMethod( "ReadSections", @ReadSections() )
- oClass:AddMethod( "DeleteKey", @DeleteKey() )
- oClass:AddMethod( "EraseSection", @EraseSection() )
- oClass:AddMethod( "UpdateFile", @UpdateFile() )
+METHOD New( cFileName ) CLASS TIniFile
- oClass:Create() // builds this class
- ENDIF
-
- RETURN oClass:Instance() // builds an object of this class
-
-STATIC FUNCTION New( cFileName )
-
- LOCAL Self := QSelf()
LOCAL Done, hFile, cFile, cLine, cIdent, nPos
LOCAL CurrArray
@@ -140,9 +132,8 @@ STATIC FUNCTION New( cFileName )
RETURN Self
-STATIC FUNCTION ReadString( cSection, cIdent, cDefault )
+METHOD ReadString( cSection, cIdent, cDefault ) CLASS TIniFile
- LOCAL Self := QSelf()
LOCAL cResult := cDefault
LOCAL i, j, cFind
@@ -170,9 +161,8 @@ STATIC FUNCTION ReadString( cSection, cIdent, cDefault )
RETURN cResult
-STATIC PROCEDURE WriteString( cSection, cIdent, cString )
+METHOD PROCEDURE WriteString( cSection, cIdent, cString ) CLASS TIniFile
- LOCAL Self := QSelf()
LOCAL i, j, cFind
IF Empty( cIdent )
@@ -211,52 +201,40 @@ STATIC PROCEDURE WriteString( cSection, cIdent, cString )
RETURN
-STATIC FUNCTION ReadNumber( cSection, cIdent, nDefault )
-
- LOCAL Self := QSelf()
+METHOD ReadNumber( cSection, cIdent, nDefault ) CLASS TIniFile
RETURN Val( ::ReadString( cSection, cIdent, Str( nDefault ) ) )
-STATIC PROCEDURE WriteNumber( cSection, cIdent, nNumber )
-
- LOCAL Self := QSelf()
+METHOD PROCEDURE WriteNumber( cSection, cIdent, nNumber ) CLASS TIniFile
::WriteString( cSection, cIdent, hb_ntos( nNumber ) )
RETURN
-STATIC FUNCTION ReadDate( cSection, cIdent, dDefault )
-
- LOCAL Self := QSelf()
+METHOD ReadDate( cSection, cIdent, dDefault ) CLASS TIniFile
RETURN SToD( ::ReadString( cSection, cIdent, DToS( dDefault ) ) )
-STATIC PROCEDURE WriteDate( cSection, cIdent, dDate )
-
- LOCAL Self := QSelf()
+METHOD PROCEDURE WriteDate( cSection, cIdent, dDate ) CLASS TIniFile
::WriteString( cSection, cIdent, DToS( dDate ) )
RETURN
-STATIC FUNCTION ReadBool( cSection, cIdent, lDefault )
+METHOD ReadBool( cSection, cIdent, lDefault ) CLASS TIniFile
- LOCAL Self := QSelf()
LOCAL cDefault := iif( lDefault, ".T.", ".F." )
return ::ReadString( cSection, cIdent, cDefault ) == ".T."
-STATIC PROCEDURE WriteBool( cSection, cIdent, lBool )
-
- LOCAL Self := QSelf()
+METHOD PROCEDURE WriteBool( cSection, cIdent, lBool ) CLASS TIniFile
::WriteString( cSection, cIdent, iif( lBool, ".T.", ".F." ) )
RETURN
-STATIC PROCEDURE DeleteKey( cSection, cIdent )
+METHOD PROCEDURE DeleteKey( cSection, cIdent ) CLASS TIniFile
- LOCAL Self := QSelf()
LOCAL i, j
cSection := Lower( cSection )
@@ -271,9 +249,8 @@ STATIC PROCEDURE DeleteKey( cSection, cIdent )
RETURN
-STATIC PROCEDURE EraseSection( cSection )
+METHOD PROCEDURE EraseSection( cSection ) CLASS TIniFile
- LOCAL Self := QSelf()
LOCAL i
IF Empty( cSection )
@@ -290,9 +267,8 @@ STATIC PROCEDURE EraseSection( cSection )
RETURN
-STATIC FUNCTION ReadSection( cSection )
+METHOD ReadSection( cSection ) CLASS TIniFile
- LOCAL Self := QSelf()
LOCAL i, j, aSection := {}
IF Empty( cSection )
@@ -317,9 +293,8 @@ STATIC FUNCTION ReadSection( cSection )
RETURN aSection
-STATIC FUNCTION ReadSections()
+METHOD ReadSections() CLASS TIniFile
- LOCAL Self := QSelf()
LOCAL i, aSections := {}
FOR i := 1 TO Len( ::Contents )
@@ -331,9 +306,8 @@ STATIC FUNCTION ReadSections()
RETURN aSections
-STATIC PROCEDURE UpdateFile()
+METHOD PROCEDURE UpdateFile() CLASS TIniFile
- LOCAL Self := QSelf()
LOCAL i, j, hFile
hFile := FCreate( ::Filename )
diff --git a/harbour/tests/stripem.prg b/harbour/tests/stripem.prg
index ad82d5d9d5..37baff4206 100644
--- a/harbour/tests/stripem.prg
+++ b/harbour/tests/stripem.prg
@@ -4,6 +4,7 @@
#include "fileio.ch"
#include "set.ch"
+#include "hbclass.ch"
#xtranslate Default( , Header
+ METHOD AddHead( cDescr ) // Add Hyperlink
+ METHOD AddPara( cPara, cAlign ) // Add Paragraph
+ METHOD Generate() // Generate HTML
+ METHOD ShowResult() // Saves Content to File
+ METHOD SaveToFile( cFile ) // Show Result
- oClass:AddData( "cTitle" ) // Page Title
- oClass:AddData( "cBody" ) // HTML Body Handler
- oClass:AddData( "cBGColor" ) // Background Color
- oClass:AddData( "cLinkColor" ) // Link Color
- oClass:AddData( "cvLinkColor" ) // Visited Link Color
- oClass:AddData( "cContent" ) // Page Content Handler
+END CLASS
- oClass:AddMethod( "New", @New() ) // New Method
- oClass:AddMethod( "SetTitle", @SetTitle() ) // Set Page Title
- oClass:AddMethod( "AddHead", @AddHead() ) // Add
Header
- oClass:AddMethod( "AddLink", @AddLink() ) // Add Hyperlink
- oClass:AddMethod( "AddPara", @AddPara() ) // Add Paragraph
- oClass:AddMethod( "Generate", @Generate() ) // Generate HTML
- oClass:AddMethod( "SaveToFile", @SaveToFile() ) // Saves Content to File
- oClass:AddMethod( "ShowResult", @ShowResult() ) // Show Result - SEE Fcn
-
- oClass:Create()
- ENDIF
-
- RETURN oClass:Instance()
-
-STATIC FUNCTION New()
-
- LOCAL Self := QSelf()
+METHOD New() CLASS THTML
::cTitle := "Untitled"
::cBGColor := "#FFFFFF"
@@ -75,26 +67,20 @@ STATIC FUNCTION New()
RETURN Self
-STATIC FUNCTION SetTitle( cTitle )
-
- LOCAL Self := QSelf()
+METHOD SetTitle( cTitle ) CLASS THTML
::cTitle := cTitle
RETURN Self
-STATIC FUNCTION AddLink( cLinkTo, cLinkName )
-
- LOCAL Self := QSelf()
+METHOD AddLink( cLinkTo, cLinkName ) CLASS THTML
::cBody := ::cBody + ;
"" + cLinkName + ""
RETURN Self
-STATIC FUNCTION AddHead( cDescr )
-
- LOCAL Self := QSelf()
+METHOD AddHead( cDescr ) CLASS THTML
// Why this doesn't work?
// ::cBody += ...
@@ -105,9 +91,7 @@ STATIC FUNCTION AddHead( cDescr )
RETURN NIL
-STATIC FUNCTION AddPara( cPara, cAlign )
-
- LOCAL Self := QSelf()
+METHOD AddPara( cPara, cAlign ) CLASS THTML
cAlign := iif( cAlign == NIL, "Left", cAlign ) // Added Patrick Mast 2000-06-17
@@ -118,9 +102,7 @@ STATIC FUNCTION AddPara( cPara, cAlign )
RETURN Self
-STATIC FUNCTION Generate()
-
- LOCAL Self := QSelf()
+METHOD Generate() CLASS THTML
::cContent := ;
"" + hb_eol() + ;
@@ -132,9 +114,7 @@ STATIC FUNCTION Generate()
RETURN Self
-STATIC FUNCTION ShowResult()
-
- LOCAL Self := QSelf()
+METHOD ShowResult() CLASS THTML
OutStd( ;
;// "HTTP/1.0 200 OK" + hb_eol() + ;
@@ -143,9 +123,8 @@ STATIC FUNCTION ShowResult()
RETURN Self
-STATIC FUNCTION SaveToFile( cFile )
+METHOD SaveToFile( cFile ) CLASS THTML
- LOCAL Self := QSelf()
LOCAL hFile := FCreate( cFile )
FWrite( hFile, ::cContent )