TNg - Norton Guides Writer

Fonte: 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 ("Veja Também") lists. The output format uses the !short:, !seealso:, and plain text directives understood by Norton Guides viewers.

Key DATA Members

DATATypeDescription
hFileHandleFile handle for the output file

Methods

MethodDescription
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