What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Prototype method to add functions to objects.

Prototype method to add functions to objects.
Author: Message:
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
O.P. Huh?  Prototype method to add functions to objects.
Well I basically tried to add 2 variables to the Messenger.MyContacts object, but I failed :-(. I'm not even sure if it's possible, but if it is, i'm sure someone can point me in the right direction.

What I did was:
code:
Messenger.MyContacts.prototype.online = 0;

but that said "Error: 'Messenger.MyContacts.prototype' is empty or no object."

Does anyone know how to do this if even possible?
[Image: 1-0.png]
             
09-02-2006 03:47 PM
Profile PM Web Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: Prototype method to add functions to objects.
The Plus objects are not actually Objects, but something else (constructors?)...prototype doesn't work on them :/
09-02-2006 04:04 PM
Profile PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Prototype method to add functions to objects.
quote:
Originally posted by deAd
The Plus objects are not actually Objects, but something else (constructors?)...prototype doesn't work on them :/

they're provided by c++ code, which doesn't have prototype.
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
09-02-2006 04:23 PM
Profile PM Web Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
O.P. RE: Prototype method to add functions to objects.
quote:
Originally posted by ShawnZ

they're provided by c++ code, which doesn't have prototype.

Ah right, so I can't add methods to the msgplus objects?
[Image: 1-0.png]
             
09-02-2006 04:36 PM
Profile PM Web Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: Prototype method to add functions to objects.
Don't think so. Not as far as I know. CookieRevised made a thread about that a while back, no success =/
09-02-2006 04:37 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
O.P. RE: Prototype method to add functions to objects.
Suggested it at the Api Wishlist :-)
[Image: 1-0.png]
             
09-02-2006 04:41 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Prototype method to add functions to objects.
quote:
Originally posted by deAd
Don't think so. Not as far as I know. CookieRevised made a thread about that a while back, no success =/
indeed (well, almost, my request was the same but for the main interfaces, not for its properties):

How to make/add your own functions to an interface?


quote:
Originally posted by deAd
The Plus objects are not actually Objects, but something else (constructors?)...prototype doesn't work on them :/
quote:
Originally posted by Ezra
so I can't add methods to the msgplus objects?
unfortualy not, as they are not true objects, nor constructors. They are interfaces...

prototype only works on objects and constructors.

This post was edited on 09-02-2006 at 10:38 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-02-2006 10:34 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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