What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Script Classes

Script Classes
Author: Message:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: Script Classes
quote:
Originally posted by markee
quote:
Originally posted by felipEx
it works fine here:

code:
var MyClass = {
   "MyVar" : new String(),
   "MyVar2" : new Boolean(),
   "MyMethod" : function()   {
       MsgPlus.DisplayToast("", "=]");
   }
}

function OnEvent_Initialize(MessengerStart)
{

var a = MyClass;
var b = MyClass;
a.MyVar2 = false;
a.MyVar = " =]  ";

Debug.Trace(a.MyVar);
Debug.Trace(a.MyVar2);

a.MyMethod();
b.MyMethod();

}

[Image: msn_happy.gif]
Correct me if I'm wrong, but isn't that an array rather than a class?  To do classes don't you need to use prototype (which doesn't work on pre-defined classes that Patchou makes accessible)?
no its just using the object, the prototype is so that you can share functions, properties over every instance of that object
[Image: dt2.0v2.png]      Happy Birthday, WDZ
07-08-2007 03:00 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Script Classes - by Toneo on 07-08-2007 at 07:52 AM
RE: Script Classes - by felipEx on 07-08-2007 at 08:39 AM
RE: Script Classes - by Toneo on 07-08-2007 at 10:44 AM
RE: Script Classes - by Ezra on 07-08-2007 at 11:20 AM
RE: Script Classes - by Toneo on 07-08-2007 at 11:22 AM
RE: Script Classes - by markee on 07-08-2007 at 02:47 PM
RE: Script Classes - by -dt- on 07-08-2007 at 03:00 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On