Forum Discussion

MurphyAKL's avatar
MurphyAKL
New Contributor
14 years ago

Autocompletion for Custom Classes

We are working to create records using classes in VBScript.  After creating our class with public variables and instantiating an object of that class, the autocompletion does not come up after typing "oObject." .   Is there a way to make the autocompetion work with custom classes?
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Are you instantiating your object in the same unit that the class is declared in?  If not, you'll not be able to reference that object at all.



    From TestComplete help:



    However, in TestComplete’s VBScript projects, you can create class instances
    only in the same script unit where the class is defined. Creating a class
    instance in another unit causes an error.




    and



    To solve the problem, you can create a helper routine in the unit, in which the
    class is defined. This routine will create a class instance and return it. You
    can then call this routine from another unit and work with the created class
    instance in a usual manner
  • MurphyAKL's avatar
    MurphyAKL
    New Contributor
    It is created using the helper method so it can be used in different units. 



    Working with the object is not a problem right now, we are just hoping there is a way to get the Autocompletion to work with the variables defined in the class to make life easier.

  • Hi Jake,





    TestComplete doesn't provide such functionality. However, we have an appropriate suggestion in our DB, and your post has increased its rating.

    Thanks.