Hello,
I'm trying to create a function for handling my windows globally, this means all events should be handover to this function. But now I got this far and took a look at the documentation, I noted there's no global window event? Just with the WindowId in it.
I'd like to use OnWindowEvent_CtrlClicked, where Window stands for all windows. Is there any way to achieve this? Thanks.
Edit: Here's some of the code i'd like to implement.
code:
cWindow = function(oCmds)
{ if (!oCmds) oCmds = {};
this.__coll = Array(); // Collection windows
this.__cmds = oCmds;
this.openWindow = function(sFile, sName, sOptions)
{ if (!this.__coll[sName])
this.__coll[sName] = MsgPlus.CreateWnd(sFile, sName, sOptions);
// Maybe there's a way to add the handling here?
};
this.handleWindow = function(sWindow, sCtrlId)
{ // Handling here
if (this.__cmds[sWindow][sCtrlId]())
return true;
else
return false;
}
this.closeWindow = function(sName)
{ this.__coll[sName] = null;
};
}
Calling function:
code:
var oOS;
cOutlookStatus = function(oSetting)
{ this.__register = new cRegister();
this.__timer = new cTimer();
this.__window = new cWindow(
{'__OS_wndCalender':
{'__OS_btnStatusSave' : function()
{ MsgPlus.DisplayToast('Made IT!');
}
}
}
);
with (oSetting)
{
this.version = version || 1.09;
}
};
Edit: Spacing is removed?