Game Development Community

CRASH: omitting profile from a Gui control

by Jason Cahill · in Torque Game Builder · 06/11/2005 (10:18 pm) · 1 replies

Here is a simple GUI file for a score hud:

//--- OBJECT WRITE BEGIN ---
new GuiChunkedBitmapCtrl(scoreHudGui) {
   profile = "GuiContentProfile";
   horizSizing = "relative";
   vertSizing = "relative";
   position = "0 0";
   extent = "640 480";
   minExtent = "8 8";
   visible = "1";
   useVariable = "0";
   tile = "0";

   new fxSceneWindow2D(sceneWindow2D) {
      profile = "GuiContentProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "0 0";
      extent = "640 480";
      minExtent = "8 8";
      visible = "1";
      lockMouse = "0";
	};

	new GuiTextCtrl(ScoreLevel) {
		profile = "GuiTextProfile";
		horizSizing = "left";
		vertSizing = "bottom";
		position = "500 25";
		extent = "75 18";
		minExtent = "8 2";
		visible = "0";
		text = "";
		maxLength = "255";
	};

	new GuiTextCtrl(ScoreSteps) {
		//profile = "GuiTextProfile";
		horizSizing = "left";
		vertSizing = "bottom";
		position = "500 50";
		extent = "75 18";
		minExtent = "8 2";
		visible = "0";
		text = "";
		maxLength = "255";
	};
};
//--- OBJECT WRITE END ---

and here is the offending line:

//profile = "GuiTextProfile";

If you uncomment this line everything works fine. Comment this line and T2D crashes on boot on Windows.

#1
06/12/2005 (1:41 am)
Sorry, I missed the point. ;)

Seriously though, I'll pass it along.

- Melv.