Forum Discussion
2 Replies
Hi Raz,
That's strange that sometimes it works and sometimes it doesn't. What TestComplete version and script language are you using?
- hlalumiereRegular ContributorIf the other unit is not included via USEUNIT, the variable does not exist in the running unit's context. This is pretty much how every programming language behaves. Think of each unit as a self contained class, not a module or static class. If you need a truly global variable use Project.Variables.
Are you sure the object instance didn't just crash, or unexpectedly disposed, with the variable now pointing to Nothing?