Game Development Community

T3D Beta 2: addField with the same name in 2 group different group - LOGGED

by elvince · in Torque 3D Professional · 09/08/2010 (7:00 am) · 4 replies

Hi,
Build: 1.1 Beta - Full template

Platform: Windows 7 64 bit

Target: gui editor

Issues:I'm not sure if this is the regular behavior or not.
When you are setting something like that:
addGroup("Pose: Standing");
		addField( "spreadSpeed", TypeF32, Offset(mScaleSpeed, GuiDynamicCrosshairHud) );
		addField( "sensitivity", TypeF32, Offset(mSensitivity, GuiDynamicCrosshairHud) );
	endGroup("Pose: Standing");

	addGroup("Pose: Crouching");
		addField( "spreadSpeed", TypeF32, Offset(mCrouchScaleSpeed, GuiDynamicCrosshairHud) );
		addField( "sensitivity", TypeF32, Offset(mCrouchSensitivity, GuiDynamicCrosshairHud) );
	endGroup("Pose: Crouching");

In the GUI editor(F10), you will have the 4 field, but value of group 1 will be shared with group 2.

If it the regular behavior, I will remover the Bug tag from it.

Steps to Repeat:
1. Edit a Gui in C++ with above code
2. Launch the game a press F10
3. Change one field value
4. press F10
5. Press F10 again and look at other group value, it changed.

#1
09/08/2010 (4:44 pm)
That looks like a bug to me... field names must be unique for an object.
#2
09/08/2010 (4:58 pm)
Logged as TQA-1040 for the QA Team to verify.
#3
09/08/2010 (5:05 pm)
Isn't that actually a user error in that he's trying to use the same names for those fields in two different locations?
#4
09/08/2010 (6:36 pm)
Yeah, that's my bad. Its a silly mistake from my resource :P. So there is no bug in the engine i guess/hope.