quote:
Originally posted by Shondoit
I need some kind of method, to pass a custom Object to a PlusWnd, so I can use it again when the OnWindowEvent_CtrlClicked event fires....
i.e.
code:
function CreateWnd () {
MyObject = new Object()
MyObject.Name = "MyCustomObject"
MyObject.Param = "ParamValue"
var Wnd = MsgPlus.CreateWnd("windows.xml","settings")
Wnd.CustomObject = MyObject
}
function OnSettingsEvent_CtrlClicked (Wnd, ControlId) {
var MyObject = Wnd.CustomObject
Debug.Trace(MyObject.Name)
}
This doesn't work, but I need something that has the same effect
make and declare your object variable as a global variable, not as a local one:
code:
var MyObject = new Object();
function CreateWnd () {
MyObject.Name = "MyCustomObject"
MyObject.Param = "ParamValue"
var Wnd = MsgPlus.CreateWnd("windows.xml","settings")
}
function OnSettingsEvent_CtrlClicked (Wnd, ControlId) {
Debug.Trace(MyObject.Name)
}