Forum Discussion

ekiza23's avatar
ekiza23
Contributor
13 years ago

Naming the methods in the Script Extensions

Hi all,



I have been working with Script Extensions lately, and I have found a curious thing.



Note: I am using the same name for the "Name" and "Routine" fields in the Description.xml



It would seem that if a method that I am adding to a script extension starts with the word "execute" or "run", it will not be available in the autocomplete functionality of the runtime object. If I change the name (both in the script file and the Description.xml), it will work.



examples:

DOES NOT work:


          <Method Name="executeMysqlCommand" Routine="executeMysqlCommand">            


          </Method>

DOES work:


          <Method Name="mysqlCommand" Routine="mysqlCommand">


          </Method>




DOES NOT work:


          <Method Name="runSQLFileInstructions" Routine="runSQLFileInstructions">           


          </Method>

DOES work:


          <Method Name="sqlFileInstructions" Routine="sqlFileInstructions">


          </Method>




Are there any specific rules on naming Subs and Functions for Script Extensions?

1 Reply


  • Hi Christian,


     


    I cannot reproduce this behavior in TestComplete 9.20. Are you using this product version?


    Also, please make sure that the executeMysqlCommand and runSQLFileInstructions functions are declared in the script file.