Using the Tutorials

 

Using the Tutorials

Each tutorial demonstrates the use of Builder Xcessory in the construction of an interface. Tutorials do not share interfaces and are designed to stand alone, but we recommend that you do them in the order presented. The later tutorials tend to be more complex, and take for granted procedures described in detail in early tutorials. In general, if you are uncertain about the functionality of Builder Xcessory, review the Builder Xcessory User's Guide and the Builder Xcessory Reference Manual .

Setting Up Tutorial Directories

When Builder Xcessory writes a Callbacks file to a directory containing another Callbacks file with the same name, new callback stubs are simply appended to the old Callbacks file. Therefore, if you are starting a new interface, it is a good idea to do one of the following:

Starting a new interface

· Create a new directory and direct output files to that directory.

· Use the File Names tab of the Code Generation Preferences dialog (Browser:Options) to rename the Callbacks files to be generated for the new interface.

In each of the following tutorials, you will create an interface for which you will write output files. To prevent these files from overwriting one another, create the subdirectories Tut1 , Tut2 ,..., Tut9 .

Changing the Destination Directory

When you begin a new tutorial, use the following procedure:

  1. Select Code Generation Preferences from the Browser Options menu.
  2. On the File Names tab, enter the path for the appropriate directory in the Directory Path text field.
  3. For example, when you write out the files for Tutorial 1, change the path (which by default will be the directory from which you originally started Builder Xcessory) <tutorial_path>/Tut1 Click the OK button to the right of the text field.
  4. Click the Dismiss button to remove the dialog.

Notation of Wrapped Code

As a consequence of the long identifiers common in Motif, some identifiers are hyphenated in the code fragments presented below. In this and other cases, code that is intended to be entered as a single line in your program wraps around to a second line in the documentation.

Wrapped text is denoted by indentation of the second and subsequent lines. For example, the line:

XmAnyCallbackStruct
*acs=(XmAnyCallbackStruct*)call_data;

should be entered on one line in your program.

 

Documentation: