Can SilkTest inherit a data member from a class declaration in a windows (object) declaration?

Can SilkTest inherit a data member from a class declaration in a windows (object) declaration?

In SilkTest, you can define a data member in a class declaration, however for any object declarations for that class, you have to re-declare what type of data member it is.

For example:

winclass MyBrowserChild : BrowserChild
    ANYTYPE aMyDataMember
 
window MyBrowserChild SomePage
    aMyDataMember = 3 // syntax error will occur even though it is in the class declaration
    ANYTYPE aMyDataMember = 3 // need to re-declare in the object declaration


For the window declaration to compile the aMyDataMember variable has to be redefined with its type, therefore SilkTest cannot inherit its type in this fashion.

The 4Test language does not permit class level variable assignments in winclass or window declarations. Initialisation is permitted when a class variable is declared. The text below from the online help correctly defines allowed statement types that can be included in a window declaration.

"The statements that make up the window declaration. These include a required tag statement, and optional variable declarations, parent statements, declarations for child windows, method definitions, and property definitions."

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:26
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.