I'm facing this error in FWH1905:
- Code: Select all Expand view
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 06/19/19, 10:53:54
Error description: Warning BASE/1004 Message not found: TFONT:CCLASSNAME
Stack Calls
===========
Called from: source\rtl\tobject.prg => TFONT:ERROR( 0 )
Called from: source\rtl\tobject.prg => TFONT:MSGNOTFOUND( 0 )
Called from: source\rtl\tobject.prg => TFONT:CCLASSNAME( 0 )
Called from: .\source\classes\FONT.PRG => TFONT:SAVETOTEXT( 473 )
Called from: _fontTests.prg => MAIN( 8 )
with this test code:
- Code: Select all Expand view
#include "Fivewin.ch"
Function Main()
LOCAL oFont, oFile
LOCAL cFontText
oFont := TFont():New("Segoe UI Bold", 0, -10, , , .T., , , , .F., .F.)
cFontText := oFont:SaveToText(0)
? cFontText
oFile := TTxtFile():Create("_fontAsTxt.txt")
oFile:Open()
oFile:AppendLn(cFontText)
oFile:End()
RETURN nil
I found this:
- Code: Select all Expand view
cInfo := Space( nIndent ) + "OBJECT " + If( nIndent > 0, "::", "" ) + ;
"oFont AS " + ;
If( nIndent > 0, Upper( Left( ::ClassName(), 2 ) ) + ;
Lower( SubStr( ::ClassName(), 3 ) ), ::cClassName ) + ;
CRLF + CRLF
There is no ::cClassName defined.
But I'm searching for a way to save the used font as text (in DBF table) and create the object from that text:
- Code: Select all Expand view
OBJECT ::oFont AS TFont
::cFaceName = "Segoe UI Bold"
::lBold = .F.
ENDOBJECT
Is there a way to do this?
Thank you in advance
Sincerely
-----------------
Additional info:
I tried the obvious like this:
- Code: Select all Expand view
Function Main()
LOCAL oTest
oTest := TTestFont():New()
XBrowse(oTest)
RETURN nil
CLASS TTestFont
DATA oFont
DATA cFaceName
DATA lBold
METHOD New() CONSTRUCTOR
ENDCLASS
METHOD New() CLASS TTestFont
OBJECT ::oFont AS TFont
::cFaceName = "Segoe UI Bold"
::lBold = .F.
ENDOBJECT
RETURN Self
but then I got this error with FWH1905
- Code: Select all Expand view
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 06/19/19, 11:22:36
Error description: Warning BASE/1005 Message not found: TFONT:_CVARNAME
Stack Calls
===========
Called from: source\rtl\tobject.prg => TFONT:ERROR( 0 )
Called from: source\rtl\tobject.prg => TFONT:MSGNOTFOUND( 0 )
Called from: source\rtl\tobject.prg => TFONT:_CVARNAME( 0 )
Called from: .\source\function\OBJECTS.PRG => SETOBJECT( 12 )
Called from: _fontTests.prg => TTESTFONT:NEW( 33 )
Called from: _fontTests.prg => MAIN( 17 )
Thank you again