Command/Function Highlight and predicting?
by Hayden Scott-Baron · in Torsion · 05/22/2007 (5:57 am) · 3 replies
I'm currently learning Torque Game Builder, and I'm using Torsion as my IDE, but I'm finding it rather lacking.
There doesn't seem to be much in the way of highlighting or prediction for functions, such as the following:
%this.serLinearVelocityY( 0 );
This is a typo (it should have been setLinearVelocityY), but it took me a little while to find because Torsion doesn't highlight commands such as "setLinearVelocityY". Is there any reason this is omitted? I'm coming from the Blitz 3D camp, so it's unusual for me to see the commands left blank like this.
There doesn't seem to be much in the way of highlighting or prediction for functions, such as the following:
%this.serLinearVelocityY( 0 );
This is a typo (it should have been setLinearVelocityY), but it took me a little while to find because Torsion doesn't highlight commands such as "setLinearVelocityY". Is there any reason this is omitted? I'm coming from the Blitz 3D camp, so it's unusual for me to see the commands left blank like this.
About the author
#2
Wouldn't it be possible to highlight recognised functions such as "setLinearVelocityY", even if they're used in the wrong context? This tends to be the method taken by IDEs such as Blitz, and it helps to discourage confusing label clashes. Even if it was optional, it would be useful, especially for beginners.
05/22/2007 (6:44 am)
Thank-you for the fast response, I really appreciate hearing back on this issue. Wouldn't it be possible to highlight recognised functions such as "setLinearVelocityY", even if they're used in the wrong context? This tends to be the method taken by IDEs such as Blitz, and it helps to discourage confusing label clashes. Even if it was optional, it would be useful, especially for beginners.
#3
The only drawback to the request that I can see is if an object does not, or should not, have a common function like setLinearVelocityY. Take a GUI object, for instance. There is no need for it to have a "onCollision" function, but if Torsion recognized the function while attached to a local variable referencing a GuiButtonCtrl, a user could be mislead.
Keep in mind, Torsion is continually being upgraded and patched by the developers, so expect to see more features and improvements down the road.
05/22/2007 (6:56 am)
Oh, don't get me wrong, as I definitely believe recognition of common object methods would be great to have. I guess I'm not looking for it since my first two years of Torque Script modification was performed using notepad and UltraEdit.The only drawback to the request that I can see is if an object does not, or should not, have a common function like setLinearVelocityY. Take a GUI object, for instance. There is no need for it to have a "onCollision" function, but if Torsion recognized the function while attached to a local variable referencing a GuiButtonCtrl, a user could be mislead.
Keep in mind, Torsion is continually being upgraded and patched by the developers, so expect to see more features and improvements down the road.
Employee Michael Perry
ZombieShortbus
%this is a strange variable, because it does have some smart capabilities since it is usually passed in as a parameter referencing the object calling the method.
However, most of the time, a local scope variable could contain any method or variable you come up with, making prediction difficult. If you are using a concrete object, like Player or Item, there are more notifications of typos, intellisense, and improper method calling.