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.
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."