paul_grizzaffi
12 years agoOccasional Contributor
Code Completion for User-Defined Objects
Hello,
When I have a user-defined JScript object in my test script (or in an external file that’s accessed via USEUNIT), I can’t figure out how to get code completion and “go to declaration” to work on methods defined on that object.
For example, consider the following code:
var MyObject = {
method1: function (){
}
}
function function1() {
}
function main() {
function1();
MyObject.method1();
}
Code completion (ctrl-space) will complete the function name function1, but will not complete the name method1. Also, ctrl-click on the call to function1 will take me to the declaration of function1, but will not take me to the declaration of method1.
Is there a way to cause this to work? My apologies if there’s already a topic on this, but I couldn’t find it.
Thanks!
Paul
When I have a user-defined JScript object in my test script (or in an external file that’s accessed via USEUNIT), I can’t figure out how to get code completion and “go to declaration” to work on methods defined on that object.
For example, consider the following code:
var MyObject = {
method1: function (){
}
}
function function1() {
}
function main() {
function1();
MyObject.method1();
}
Code completion (ctrl-space) will complete the function name function1, but will not complete the name method1. Also, ctrl-click on the call to function1 will take me to the declaration of function1, but will not take me to the declaration of method1.
Is there a way to cause this to work? My apologies if there’s already a topic on this, but I couldn’t find it.
Thanks!
Paul