| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ASCIIViewerClass > AsciiViewerClass Methods >====== AddItem (program the AsciiViewer object) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[asciiviewerclass functional organization expected use.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[askgotoline go to user specified line .htm|{{btn_next_n.gif|Next page}}]] | | || | | **AddItem** | **( **| //printer// | **)** | | | | | //searcher //| | {{blk2blue.jpg|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 initialize the asciiviewerclass object .htm|Init]], [[printer asciiprintclass object .htm|Printer]], [[searcher asciisearchclass object .htm|Searcher]]