No Function calls for child windows being made on debug window - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: No Function calls for child windows being made on debug window (/showthread.php?tid=79824)
No Function calls for child windows being made on debug window by MeEtc on 12-09-2007 at 06:49 PM
I'm not sure if its something I'm doing wrong or what, but none of the controls on child windows are generating function calls on the debug window for YASS as I'm trying to create it.
Window declarations: code: wnd = MsgPlus.CreateWnd('yass_gui_imgedit.xml', 'WndImageEdit', 1);
wnd.Button_SetCheckState('RadGeneral', true);
cwnd_General = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.General', 130, 60, true);
cwnd_Background = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.Background', 130, 60, false);
cwnd_DP = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.DP', 130, 60, false);
cwnd_StatusImg = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.StatusImg', 130, 60, false);
cwnd_StatusText = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.StatusText', 130, 60, false);
cwnd_Nick = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.Nick', 130, 60, false);
cwnd_PSM = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.PSM', 130, 60, false);
cwnd_PSMMedia = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.PSMMedia', 130, 60, false);
cwnd_Time = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.Time', 130, 60, false);
trying to call a function:code: function Oncwnd_BackgroundEvent_CtrlClicked(Wnd, ControlId){
Debug.Trace('ctrl clicked: '+ControlId);
if(ControlId == 'btnBgColour')
LoadColourPicker(Wnd, ControlId)
}
function Oncwnd_BackgroundEvent_EditTextChanged(Wnd, ControlId){
Debug.Trace(Wnd + ControlId);
}
when clicking a button or editing a textbox, no function call is listed in the debug window, nor is any trace text outputted. I'm thinking this must be something I'm doing, as I doubt something this major was left out out 4.50.
whats going on here?
RE: No Function calls for child windows being made on debug window by Matti on 12-09-2007 at 07:12 PM
You should use the window ID, not the variable name:
code: function OnWndimageEdit.BackgroundEvent_CtrlClicked
function OnWndimageEdit.BackgroundEvent_EditTextChanged
However I doubt this will work, as JScript uses the dot for objects and properties (e.g. Debug.Trace). Therefore I highly recommend you to remove the dot in the name to assure the correct working of your script.
RE: No Function calls for child windows being made on debug window by MeEtc on 12-09-2007 at 07:15 PM
thanks, i just found out that for myself. I had to change the dots to underscores. it works fine now.
Someone might want to update the scripting docs and xsd to say dots can't be added to the name of a WindowId
RE: RE: No Function calls for child windows being made on debug window by pollolibredegrasa on 12-09-2007 at 07:24 PM
quote: Originally posted by MeEtc
Someone might want to update the scripting docs and xsd to say dots can't be added to the name of a WindowId
quote: Originally posted by Schema Documentation
No spaces allowed. For scripts windows, punctuation is replaced by underscores.
RE: No Function calls for child windows being made on debug window by Matti on 12-09-2007 at 07:25 PM
quote: Originally posted by MeEtc
Someone might want to update the scripting docs and xsd to say dots can't be added to the name of a WindowId
Well, it sounds very normal to me not to use dots. Anyway, the documentation says:
quote: Originally posted by Window > Id
No spaces allowed. For scripts windows, punctuation is replaced by underscores.
so maybe it'll work if you use an underscore only in your script and keep using the dot in your XML?
Ugh, beaten by a fat free chicken.
|