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(1vtcl):

      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.


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