Exactly, but you could also use:
code:
function createWindow(){
var WndTest = MsgPlus.CreateWnd("interface.xml", "WndTest");
WndTest.CustomProperty = function (x,y) { return x*y }
}
function OnWndTestEvent_CtrlClicked(PlusWnd, ControlId){
Debug.Trace(PlusWnd.CustomProperty(2, 5));
}
Or
code:
function createWindow(){
var WndTest = MsgPlus.CreateWnd("interface.xml", "WndTest");
WndTest.CustomProperty = MyObject { x:3; y:4 }
}
function OnWndTestEvent_CtrlClicked(PlusWnd, ControlId){
Debug.Trace(PlusWnd.CustomProperty.x);
}