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();
}
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