Some changes as per Dave's proposal

This commit is contained in:
Antonio Linares
2001-09-05 09:48:01 +00:00
parent c0258ecfdc
commit 6e9cf7a5a6

View File

@@ -55,22 +55,12 @@
CLASS TPersistent
DATA cName
METHOD New()
METHOD SaveToText( cObjectName )
METHOD SaveToFile( cFileName ) INLINE MemoWrit( cFileName, ::SaveToText() )
ENDCLASS
METHOD New() CLASS TPersistent
::cName = "o" + ::ClassName()
return Self
METHOD SaveToText( cObjectName ) CLASS TPersistent
local oNew := &( ::ClassName() + "()" ):New()
@@ -78,7 +68,7 @@ METHOD SaveToText( cObjectName ) CLASS TPersistent
static nIndent := -3
DEFAULT cObjectName TO ::cName
DEFAULT cObjectName TO "o" + ::ClassName()
nIndent += 3
cObject := If( nIndent > 0, HB_OsNewLine(), "" ) + Space( nIndent ) + ;