Has anyone ever had any problems adding new methods to a class? I'm trying to add a SelectAll method to the TextField class. The code is below:
The SelectAll() function shows up in the library browser, but when the testcase hits the wTextField.SelectAll() line, I get the error:
**Function SelectAll() is not defined for WindowName.TextField("#1")
Your code looks good for selecting the text. There is an example in the 5.0.1 manual using Ctrl-Home and Ctrl-Shift-End for the keystrokes. You might try changing the inheritance to the AnyWin class, which will make your method available to all text fields. Also assign a unique name for the class other than TextField. It is confusing to see textfield : textfield - don't you agree? Give your class a name like MyTextField : AnyWin and see how it works.