T3D 1.1 Beta 3 - setting a guiControl to visible will not work the first time but will work afterwards - Not a bug...
by elvince · in Torque 3D Professional · 10/16/2010 (4:20 pm) · 2 replies
Build: 1.1 Beta 3 - Full template
Platform: Windows 7 64 bit
Target: GuiControl visible
Issues: If you have a Gui that is awake and a GuiWindowCtrl that is set to visible=false and you try to set the visible to true.
The first wall will failed and then if you set again the visible to true, it will work. FRom the 2nd attempt each change to visible will work.
Steps to Repeat:
1. Put a GuiWindowCtrl (with contents like button ..) with visible = false in a GuiControl
2. Awake the GuiControl
3. Set the guiContainer to visible=true
This issue was also in Beta 2
What I found that may help:
In the following function, in the for loop. The first element is awaken, then once starting the next iteration, the mVisible is set back to false.
I suspect that there is another thread that changes the value or that you have a memory leak.
I faced similar issue in libcurl implementation when the threading was not managed properly.
Platform: Windows 7 64 bit
Target: GuiControl visible
Issues: If you have a Gui that is awake and a GuiWindowCtrl that is set to visible=false and you try to set the visible to true.
The first wall will failed and then if you set again the visible to true, it will work. FRom the 2nd attempt each change to visible will work.
Steps to Repeat:
1. Put a GuiWindowCtrl (with contents like button ..) with visible = false in a GuiControl
2. Awake the GuiControl
3. Set the guiContainer to visible=true
This issue was also in Beta 2
What I found that may help:
In the following function, in the for loop. The first element is awaken, then once starting the next iteration, the mVisible is set back to false.
I suspect that there is another thread that changes the value or that you have a memory leak.
I faced similar issue in libcurl implementation when the threading was not managed properly.
void GuiControl::awaken()
{
...
// Wake up visible children.
for( GuiControl::iterator iter = begin(); iter != end(); ++ iter )
{
GuiControl* ctrl = static_cast< GuiControl* >( *iter );
if( ctrl->isVisible() && !ctrl->isAwake() )
ctrl->awaken();
}
...
}About the author
Recent Threads
#2
In fact, my issue came to the fact that the parent control is awake when the children are awaken.
It was my fault in my code.
You can close this... if Torque come back to the business.
12/12/2010 (5:19 pm)
ok I got it.In fact, my issue came to the fact that the parent control is awake when the children are awaken.
It was my fault in my code.
You can close this... if Torque come back to the business.
Associate David Montgomery-Blake
David MontgomeryBlake