We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More

Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
6 years ago
Solved

Can we pass a Object in argument of a function.

CAn we pass an object as an argrument of a function that is declared in another unit. like Unit1: 'USEUNIT Unit2 Sub Task() Set Obj = ............whatever here........ Call Validate(Obj) End s...
  • Marsha_R's avatar
    6 years ago

    When you get to the second function, you need to use something like eval() to tell it that what you passed isn't just a string.  There's an example in here:

    https://support.smartbear.com/testcomplete/docs/scripting/calling-routines/declared-in-another-unit/jscript.html