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(VTCL) establishes the connection with the SCO Visual Tcl server (including starting the server if one does not yet exist).

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

  3. VtShow(VTCL) displays the form.

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

Next topic: The kill program example

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003