What happened to my string?
by Drethon · in Torque Game Builder · 05/13/2009 (4:55 pm) · 1 replies
I tried passing a constant string from a gui to the object that created a gui by:
Creating a GUI button with an associated function:
Then having the callback call the object that created the GUI ( calingObject is a field updated with %this when the GUI is created )
At this point the echo produces "Callback:Player". This gets to the Object Function:
At this point, instead of producing "Object Function:Player", the echo outputs "Object Function:1359".
What did I misunderstand?
Creating a GUI button with an associated function:
Command = "MyGUI.GuiFunction(\"Player\");";
Then having the callback call the object that created the GUI ( calingObject is a field updated with %this when the GUI is created )
function MyGUI::GUIFunction ( %this , %MyObject )
{
echo("Callback:",%MyObject);
%this.callingObject.ObjectFunction ( %this.callingObject , %MyObject ) ;
}At this point the echo produces "Callback:Player". This gets to the Object Function:
function MyObject::ObjectFunction ( %this , %MyObject )
{
echo("Object Function",%MyObject);
}At this point, instead of producing "Object Function:Player", the echo outputs "Object Function:1359".
What did I misunderstand?
Torque 3D Owner Drethon
Default Studio Name