TNg - Norton Guides Writer
Fuente: source/classes/ng.prg
TNg is a simple writer class for producing Norton Guides format files. It supports writing short entries, long descriptions, and cross-reference ("Ver También") lists. The output format uses the !short:, !seealso:, and plain text directives understood by Norton Guides viewers.
Key DATA Members
| DATA | Type | Description |
|---|---|---|
hFile | Handle | File handle for the output file |
Methods
| Method | Description |
|---|---|
New( cOutFile ) | Create and open the output file for writing |
WriteShort( cShort ) | Write a short entry (!short: directive) |
WriteLong( cLong ) | Write a long description text block |
WriteSeeAlso( cSeeAlsoList ) | Write cross-reference list (!seealso: directive) |
End() | Close the output file |
Example: Write NG File
#include "FiveWin.ch"
function Main()
local oNg := TNg():New( "commands.ng" )
oNg:WriteShort( "DEFINE WINDOW - Create a new window" )
oNg:WriteLong( "DEFINE WINDOW oWnd TITLE cTitle [SIZE nW, nH] ..." + CRLF + ;
"Creates a new window object and activates it." )
oNg:WriteSeeAlso( "DEFINE DIALOG, ACTIVATE WINDOW" )
oNg:End()
return nil
Notes
- The output file is created via
FCreate()in theNew()constructor. - Short entries use the
!short:marker; see-also lists use!seealso:. - Long text is written as plain text lines separated by CRLF.
- Always call
End()to close the file handle; the class does not auto-close on destroy.