AddItem (program the AsciiViewer object) 

Top  Previous  Next

 

 

AddItem

( | printer | )

 

 

| searcher |

AddItem

Adds specific functionality to the AsciiViewer object.

printer

The label of an AsciiPrintClass object.

searcher

The label of an AsciiSearchClass object.

 

The AddItem method adds specific functionality to the AsciiViewer object. This method provides an alternative to the Init method for adding or changing the print and search capability of the AsciiViewer object.

Implementation:

The AddItem method sets the value of the Printer or Searcher property, initializes the printer or searcher, then enables the corresponding popup menu item.

Example:

MyPrinter  CLASS(AsciiPrintClass)         !declare custom printer object

NewMethod   PROCEDURE

          END

MySearcher  CLASS(AsciiSearchClass)       !declare custom searcher object

NewMethod    PROCEDURE

          END

 

CODE

Viewer.Init(AsciiFile,A1:line,Filename,?AsciiBox,GlobalErrors)

Viewer.AddItem(MyPrinter)             !add print functionality

Viewer.AddItem(MySearcher)            !add search functionality

See Also:     Init, Printer, Searcher