Forum Discussion
Gotcha. Yep, seeing that.
Now, HKosova probably can give a more official response but, as I understand it, the routine drop down at the top of a script edit window is intended within the context of developing test cases as script. Each "routine" is, potentially, a test case and the idea is to give easy access to select such a test case and then click the "Run Current Routine" button.
While in a full JavaScript IDE, those methods are "routines", they are not test cases or methods that can be run in such a manner... you need to instantiate the object and then run the routine. So, in the context of what TestComplete provides, this doesn't feel to me like it makes sense. That said, not sure why it works in JScript but not in JavaScript but, basically, that's how I experience it. I look forward to seeing the feature request as there might be some cool aspects about it concerning turning TC into something more of a full IDE.
Now, to your question about intellisense, etc... Creating classes and such and then having them available in what TC calls "code completion" would be cool. But keep in mind that, effectively, each script unit is being treated in the same way that a page is treated when using JavaScript for web development. You cannot call a routine or method or property of an object instantiated in a different web page unless you first import it into the web page or otherwise pass it through. So, in that line, TC is following that model. If you want an object to be available in Code completion, that object needs to be built in, somehow, to the environment either as a plugin or a Script Extension.