The DOM Editor is a tool for viewing and editing DOM definitions visually as an alternative to using the CLI directly. The information on this page relates to the DOM Editor 2.0, which improves functionality and usability, and separates viewing and editing of the client and server DOMs into independent windows.
NOTE: For information on the previous version of the DOM Editor, please refer to DOM Editor 1.0
In HSL, the data object model (classes, fields, enums, etc.) are defined independently of the scripting language (HSL). This is different than most computer languages, but gives HeroEngine it's distinctive power and real-time collaborative flexibility. The DOM can be manipulated with the CLI, but it is much easier to use the DOM Editor.
Using the DOM Editor, you may create, view, modify and delete fields, classes, enums, associations, association groups, and named package groups for both the client and the server. Changes made by the DOM editor or CLI are immediately available for use in script.
The Client DOM Editor and the Server DOM Editor are displayed independently, and available as separate HeroBlade options under the HeroScript menu. This allows maximum flexibility when you need to reference or compare data in each. Each DOM datatype is displayed on a separately tabbed page. This layout allows users to browse and modify both the client and server datatypes independently.
By default, both the client and server DOMs are set to read-only mode. This can be independently enabled or disabled using the check box in the upper right of each DOM.
When a datatype entry is selected, its detail information is displayed below it in the lower portion of the UI.
Read Only Mode
By default, the DOM Editor opens in read-only mode to prevent accidental modifications of DOM definitions. In order to make any change to the DOM definitions, you must first clear the read-only flag located in the top right section of the DOM editor.
If the DOM editor is not in read-only mode, it defaults to prompt the user before it sends a change that can cause DOM modifications. When confirmation is active, a dialog box will pop up displaying the commands which it is about to send to the server, so they can be inspected for errors or unwanted changes. Clearing this checkbox causes the editor to pass all commands directly to the server without prompting for verification.
Datatype Definition Options
- New: Opens a dialog box which can be used to create a new datatype definition.
- Delete: Deletes the selected datatype definition.
- Refresh: Forces a query of the server for the list of all definitions of the currently active type.
- Glom: (Class Only) Finds the node currently selected in the viewport and executes the commands necessary to glom the current class onto the selected node.
The text box, left center, below the list of datatype definitions, allows you to search the list of definitions for specific entries. The left and right arrow buttons enable you to move to the previous and next definitions, respectively. The Name, Description, and, optionally Type and Archetype checkboxes, depending on the datatype context, allow you to restrict the search to a specific definition column.
Definition Detail Display and Editing
The lower portion of the UI displays detail information for the currently selected datatype definition. When not in read-only mode, changes may be made and saved to the definition of the datatype. Please refer to each datatype for more information on the specific type of information that can be modified.
- Enum: Refer to MED
- Field: Refer to MFD
- Class: Refer to MCD
- Association: Refer to MAD
- Association Group: Refer to MAG
- References: For datatypes which may be used by other classes and fields, this area lists which classes or fields make use of this definition. A definition cannot be deleted if it used by other definitions. Double clicking on a reference will take you to the UI tab and detail display for the reference; it will not modify the contents of the referencing tab.
- Atomic Sets (Class Only): Classes which have replicated fields may have atomic sets defined for their replicated fields. See also: Replication
- Copy to Server / Copy to Client: Client DOM Editor option that will copy the current datatype definition information and reproduce the datatype on the server. The server button will do the same, transferring a copy of the data definition to the client
- Cancel: Abandons the changes made to the current definition.
- Save: Saves the changes made to the current definition to the server.