T3D 1.1 Final - findHitControls method returns this on empty - RESOLVED (THREED-2202)
by Nathan Bowhay - ESAL · in Torque 3D Professional · 07/19/2011 (2:48 pm) · 2 replies
Build: 1.1 Final
Platform: Windows Vista 64-bit
Target: Torque Script method (findHitControls)
Issues: If you call the method findHitControls it seems to return the this pointer id.
Steps to Repeat:
1. Launch the game
2. Press F10 to enter the gui editor
3. Create a guiControl that has an extent of "64 64" and name it "MyGroup".
4. In the console type:
You will see it returns the id of MyGroup. I would expect it to return an empty string.
Now if you make another guiGuiControl called "test" that has an extent of "20 20" and a position of "0 0" and is the child (inside) of MyGroup. Then type this in the console:
You will noticed it only returns test gui's id. I am guessing this is expected behavior, but seems a little odd. I would expect it to return an empty string. If this is expected and it would cause issues to change it to return an empty string, it should probably say so in the inline documentation for the console method.
Main reason it makes more sense to have an empty string is it makes a getWord loop a little easier without having to do some odd checking of your own id. Or a simple if to see if there are any controls in that area.
Platform: Windows Vista 64-bit
Target: Torque Script method (findHitControls)
Issues: If you call the method findHitControls it seems to return the this pointer id.
Steps to Repeat:
1. Launch the game
2. Press F10 to enter the gui editor
3. Create a guiControl that has an extent of "64 64" and name it "MyGroup".
4. In the console type:
echo(MyGroup.findHitControls(0, 0, 30, 30)); echo(MyGroup.getId());
You will see it returns the id of MyGroup. I would expect it to return an empty string.
Now if you make another guiGuiControl called "test" that has an extent of "20 20" and a position of "0 0" and is the child (inside) of MyGroup. Then type this in the console:
echo(MyGroup.findHitControls(0, 0, 30, 30)); echo(MyGroup.getId()); echo(test.getId());
You will noticed it only returns test gui's id. I am guessing this is expected behavior, but seems a little odd. I would expect it to return an empty string. If this is expected and it would cause issues to change it to return an empty string, it should probably say so in the inline documentation for the console method.
Main reason it makes more sense to have an empty string is it makes a getWord loop a little easier without having to do some odd checking of your own id. Or a simple if to see if there are any controls in that area.
Torque 3D Owner Christopher Tauscher
Default Studio