DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Creating an SCO Visual Tcl program -- an overview

Creating an SCO Visual Tcl program -- an overview

This chapter presents a step-by-step process for creating a basic SCO Visual Tcl program, for which the completed code is shown at the end of the chapter.

Almost all programs you will write in SCO Visual Tcl, including the Kill program used in this chapter, follow this basic code outline:

  # Define callbacks and procedures

proc buttonCB {} {...} proc listCB {} {...} proc foo {} {...}

# Start program

VtOpen VtFormDialog

<fill in form>

VtShow $form VtMainLoop

Appearing first in the program are the callback and procedure definitions. The above program has three: buttonCB, listCB, and foo.

Next, the following code appears:

  1. VtOpen(1vtcl) establishes the connection with the SCO Visual Tcl server (including starting the server if one does not yet exist).

  2. VtFormDialog(1vtcl) creates the first form of the program. This form is then filled with widgets.

  3. VtShow(1vtcl) displays the form.

  4. VtMainLoop(1vtcl) gives control of the program to the user, and the program waits for events.

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004