Using SPARCworks Visual

(or, "Visual Basic for Unix")

Introduction

There are many ways to write applications that provide a Graphical User Interface in a UNIX environment, all of which involve programming the X Window system in one way or another. SPARCworks Visual provides a graphical way to do this on Solaris systems. There is a very good tutorial that will walk you through the development of a moderately complex user interface. This page describes how to run the tutorial and the visu program.

Running the Anwerbook Navigator and Viewer

The tutorial comes as a PostScript book with embedded hypertext links. It could be printed out, but the best way to read it is online using a program called answerbook. To use answerbook you must be using one of the SPARC workstations in the lab. The last time I tried, it did not work on the Network Computers (nc5, etc.), only on the "cat" machines. The issue is the need to support "Display Postscript" for drawing on the screen. Note that this requirement applies to running the tutorial, but not to running SPARCworks Visual, which will run on any computer running an X Window server, including the nc machines.

Type answerbook on a command line, and the "AnswerBook Navigator" will come up on the screen after doing some housekeeping to see what AnswerBooks are installed on your computer. The navigator has a list of the AnswerBooks in the bottom panel. Scroll down until you come to the one for SPARCworks/Visual1.1 and double click on it. The top panel will now give you the table of contents for the book. You can start reading the book from the beginning, or you can skip directly to Chapter 2, where the tutorial starts. Click on anything in the top panel of the navigator, and a big "AnswerBook Viewer" window will show up with one page of the book displayed. Click on the forward and back arrows at the top right of the Viewer to change pages, or click on the hypertext links, which show up as boxes around text or page numbers.

While you read the tutorial, you will want to have SPARCworks Visual running so you can do the exercises in the tutorial. Read on...

Running SPARCworks Visual

Type visu on the command line.

Troubleshooting

The DISPLAY environment variable must be set to an X Window host that supports Display Postscript, such as the cat machines in the lab in order to run answerbook. You should be sitting in front of that host computer.

If the AnswerBook Navigator comes up but doesn't include SPARCworks/Visual1.1, tell a systems administrator that the answerbook installation isn't correct on the computer you are using.

The VISUROOT environment variable should be set to /opt/SUNWspro/visu1.1.

The directory /opt/SUNWspro/bin must be in your PATH.


Christopher Vickery
Computer Science Department
Queens College of CUNY