Watson Graphics Tutorial


Home
Labs
Tutorials
Known Bugs
Schedule
Archive
Members
Contact Information

Editing Code

The Watson Graphics Lab works in two ways. You can either input program code or draw interactively.

Entering program code

  1. To begin using the lab, open the Choice Selection Panel by pressing the Activity button on the Watson Control Bar. From this panel you can choose to look at an example, work an activity, or practice on the scratchpad.
  2. To start writing a program you must first declare some variables. Choose the variables you will need by clicking the corresponding Data Type buttons. Notice how your variables will all be shown in the Variable Declarations window.
  3. Now to write some code. To insert commands, click on one of the seven Commands buttons. Notice how after choosing a command it is shown in the Program Code window written in capital letters. When a segment of code is written in capital letters it is unassigned. To assign values to code click on the code segment. When either a Choice Selection Panel or a Numeric Entry Pad pops up select an object or a value.

    Note: Program code that can be changed will turn from yellow to red when the cursor is passed over it. Most code can be changed at any time. However, when a segment of code is written in all capital letters it must be changed prior to execution.

  4. To insert a code segment click the vertical region on the left side of the Program Code window.  To delete a code segment click on the small circle directly left of the segment to be deleted.

Inserting / Deleting Code

  

After writing the code your program is ready to run. Simply press the Run button under the Program Execution Controls to make the lab execute your code. To step through your code, line by line, use the Walk button.
 

Drawing Interactively

  1. To begin using the lab, open the Choice Selection Panel by pressing the Activity button on the Watson Control Bar. From this panel you can choose to look at an example, work an activity, or practice on the scratchpad.
  2. To start drawing interactively, choose an object by clicking one of the Data Types buttons.
  3. Once a variable is declared move the cursor to the Drawing Window and place the object.
  4. Check out the Program Code window to see the corresponding code that was written.

<< Back

Back to Tutorials

Next >>



Home | Labs | Tutorials | Known Bugs | Schedule | Archive | Members | Contact Information

For problems or questions regarding this site or the labs, contact the Watson Project.
Last updated: 10/22/03.