Shoutbox

Extending a ChtWnd Object? - 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: Extending a ChtWnd Object? (/showthread.php?tid=85515)

Extending a ChtWnd Object? by Zero on 08-21-2008 at 02:33 PM

Hi folks,

I wanna do something that seems like it'd be pretty simple, but I think I need an example of the syntax to get it right, assuming it can be done.

What I want is to add a variable to a Chat Window object so that it can be accessed something like "objChatWindow.myInteger = 1".

Can anyone provide me with an example of how to do that properly?


RE: Extending a ChtWnd Object? by Volv on 08-21-2008 at 02:48 PM

Apparently you can't modify Messenger Plus objects as they are not actually objects, I believe Messenger Plus handles them in a different way (external to the rest of the JScript). Someone will probably be able to explain it better.
An alternative would be to use an array with the window handle as the index.
myInteger[objChatWindow.Handle] = 1;


RE: Extending a ChtWnd Object? by deAd on 08-21-2008 at 02:52 PM

You can only extend the javascript native objects (like String, Number, etc). I would recommend using an array as Volv said.