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:
-
VtOpen(VTCL)
establishes the connection with
the SCO Visual Tcl server (including starting
the server if one does not yet exist).
-
VtFormDialog(VTCL)
creates the first form of the program. This form is
then filled with widgets.
-
VtShow(VTCL)
displays the form.
-
VtMainLoop(VTCL)
gives control of the program to
the user, and the program waits for
events.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005