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

Establishing a connection to the server (VtOpen)

The first line of Main opens a connection to the server with VtOpen(VTCL):

      set app [VtOpen Example]

VtOpen requires a string to be passed along with it as an argument. This string (in our case, ``Example'') identifies the application.


NOTE: Because everything in SCO Visual Tcl is read as a string, quotation marks (" ") are not needed around Example.

About the widget tree

VtOpen returns a ``handle'' in response to the command set app [VtOpen Example].

This handle is stored in the variable app and will be used as the top of the ``widget tree''. The widget tree is similar to a tree of files and directories, with each widget requiring a parent (and many having children).

The handle returned from VtOpen becomes the ``root'' (parent) of the widget tree.

Specifying the command to execute

The square brackets indicate to SCO Visual Tcl that a command is to be executed. This is similar to back-quoting in shell programming. The set app line results in the variable app being set to the result of the command enclosed within brackets (VtOpen Example).

To refer to the value of a variable, precede it with a dollar sign ($). For example, to access the value of the app variable, refer to it as $app.


Next topic: Creating the main form (VtFormDialog)
Previous topic: Coding the Main routine

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