User Tools

Site Tools


additem_program_the_asciiviewer_object_.htm
Navigation:  ABC Library Reference > ASCIIViewerClass > AsciiViewerClass Methods >====== AddItem (program the AsciiViewer object) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page
AddItem ( printer )
searcher

blk2blue.jpg

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

additem_program_the_asciiviewer_object_.htm.txt · Last modified: 2021/04/15 15:56 by 127.0.0.1