Editing WML Files

Setting data for generation into the WML file involves completing several forms with the data appropriate to each named tag. Almost all the data is string (text) or boolean (on/off) data; there are a few items that are lists of strings.

BX Object Packager Edit Menu

The Edit menu provides several options, each of which is shown on the BX Object Packager Toolbar. Each menu item corresponds to one of the major portions of the WML file. (Refer to Chapter 8--Modifying the WML File for more detailed information, or use the Help menu or the F1 key for context-sensitive help information.)

Edit Selector

Selecting a menu item to display the Editor Selector, a list of previously defined values of this type, if any, as shown in the following figure:

Figure 2. Editor Selector with Two Classes Defined

Adding and selecting an item

To add a new item, use one of the following methods:

  • Select an item by double-clicking on the item, and edit its characteristics.
  • Click on the Edit Selected button.

Classes and Resources

The primary screens are for Classes and Resources. Refer to "Changing Class Information" and "Changing Resource Information" for more information about using these screens. In general, the most important information is presented first.

Typically, only information marked with an asterisk is required, although your particular objects might demand additional specifications.

Figure 3. Data Editor Screen

The data screens are designed so that you can back out your changes without modifying the data. The "Cancel" option restores items to their previous settings without affecting the saved data. You can then reselect the item to edit its associated data.


Note: These screens use the Return key as a signal to save the data and to unpost. You should use the Motif traversal mechanisms (the tab key and the arrow keys, or clicking with the mouse) to move keyboard focus within the window.


Loading Data From Widget Libraries

The Class Values editor allows you to define how the Builder Xcessory manipulates the widget or component. You can define resources, automatically-created children, and valid children.

In addition, you can define resources. For widgets and gadgets, there are often many resources. If you have the library containing this widget or gadget class in the shared-library form that the Builder Xcessory can load automatically, and are not on SunOS 4, then you can use the Builder Xcessory Object Packager to load the initial resource definitions directly from the library, rather than enter them all by hand.

Loading a library

To load a library, use the following procedure:

  1. Click on the Class button.
  2. In the Class Editor Selector, enter the class name for the widget or gadget.
  3. Click on Edit Selected to edit the class.
  4. On the Class Data screen, check that Object Type is either Widget or Gadget.
  5. Set XtLiteral to the name of the widget class (for example, for XmDumbLabel, set it to xmDumbLabelWidgetClass).
  6. Select LiveObject, which tells the Builder Xcessory to load the class defined in the WML file automatically from the library when it runs.
  7. Specify LoadLibrary to name the library to load it from.

    The Builder Xcessory Object Packager uses the same search path as the Builder Xcessory, so you can probably specify just the name of the library without specifying a full path to it. When you continue to the next item, you will be asked for confirmation about loading the widget or gadget class from the library.


    Note: Because Xt modifies widget classes when they are initialized in such a way that the original information in the widget or gadget class cannot be reconstructed, if you load a library that the Builder Xcessory Object Packager itself uses, you will see best-guess data.

  8. Move to the next field with the Tab key. A dialog appears to confirm that the resources should be loaded.

    Note: You cannot load libraries on SunOS 4.

Documentation: