Calling an ancestor function

When you write a script for a descendent window, user object, or menu, you can call user-defined functions that have been defined for any of its ancestors. To call the first function up the inheritance hierarchy, just call the function as usual:

function ( arguments )

If there are several versions of the function up the inheritance hierarchy and you do not want to call the first one up, you need to specify the name of the object defining the function you want:

ancestorobject::function ( arguments )

This syntax works only in scripts for the descendent object itself, not in scripts for controls or user objects in the descendent object or in menu item scripts. To call a specific version of an ancestor user-defined function in a script for a control, user object, or menu item in a descendent object, do the following:

  1. Define an object-level user-defined function in the descendent object that calls the ancestor function.

  2. Call the function you just defined in the descendent script.

For more information about calling an ancestor function, see the PowerScript Reference.