PTD Documentation

[Help Home] [Phantom Home]
The Window Declarations Editor

Window Declarations files recorded using the Window Declarations Recorder (see the Phantom documentation) can be loaded and edited in PTD. Load a window declarations file by selecting ‘Open’ from ‘Declarations’ in the main menu. The loaded declarations will appear as a tree of windows in the ‘Declarations’ tab near the ‘Suites’ tab. Every Declarations file loaded will appear.



Selecting a declaration will cause its properties to appear in the Window Declarations viewer, located below the declarations file list. The declarations properties can be changed, including the name, tag, and class of the window.

Changes to a window declaration element will take effect automatically when another declarations element is selected.

Saving the declarations file by selecting the file in the viewer and then selecting ‘Save’ from the ‘Declarations’ main menu will make the changes permanent. A declarations file can be closed by selecting the file in the viewer and then selecting ‘Close’ from ‘Declarations’ in the main menu.

Drag and Drop
The Window Declarations Editor supports drag and drop functionality. To add a declarations file to a script, left-click the declarations file in the declarations viewer and drag it (while holding the left mouse button) to the script. A Phantom ‘use’ statement will automatically be inserted in to the script with the full path of the declarations file.

A window tree can also be inserted by selecting the window in the declarations viewer and dragging it to the script. The full tree path of the window will be inserted directly in to the script. Phantom window member functions can then be applied to the window.



Editing Declarations
The contents of a window declarations file can be edited using the PTD Window Declarations Viewer. A particular window can be deleted or new windows can be added. Additionally, window declarations can be copied from another file and added to an existing file.

To modify the window declarations contents, right-click on the window to modify in the Window Declarations Viewer. A popup menu will appear with the modifications that can be made to the window.

Insert Child’ will insert a new, empty declaration as a child to the selected window.
Insert Before’ will insert a new, empty declaration prior to the selected window.
Insert After’ will insert a new, empty declaration after the selected window.

The new declarations can be edited like any other declaration, and should be given a Tag, Class, and Name consistent with the window the declaration is to represent. This feature is useful for adding windows that may not be visible when the declarations file was originally created, without having to re-record the entire window declarations file.

Selecting ‘Edit’ will show a separate menu whereby declarations can be copied, deleted, and pasted.

Copy’ will copy the selected declaration and all children. This declaration can then be pasted using the ‘Paste …’ menu items.
Paste In’ will paste the previously copied declarations as a child of the selected declaration.
Paste Before’ will paste the previously copied declarations prior to the selected declaration.
Paste After’ will paste the previously copied declarations after the selected declaration.
Delete’ will permanently remove the selected declaration and all children.

For more information on window declarations and how to use them, consult the Phantom documentation.


Copyright 2000-2011 Phantom Automated Solutions