Prototype method to add functions to objects. - 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: Prototype method to add functions to objects. (/showthread.php?tid=65734) Prototype method to add functions to objects. by Ezra on 09-02-2006 at 03:47 PM
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. code: but that said "Error: 'Messenger.MyContacts.prototype' is empty or no object." Does anyone know how to do this if even possible? RE: Prototype method to add functions to objects. by deAd on 09-02-2006 at 04:04 PM The Plus objects are not actually Objects, but something else (constructors?)...prototype doesn't work on them :/ RE: Prototype method to add functions to objects. by ShawnZ on 09-02-2006 at 04:23 PM
quote: they're provided by c++ code, which doesn't have prototype. RE: Prototype method to add functions to objects. by Ezra on 09-02-2006 at 04:36 PM
quote: Ah right, so I can't add methods to the msgplus objects? RE: Prototype method to add functions to objects. by deAd on 09-02-2006 at 04:37 PM Don't think so. Not as far as I know. CookieRevised made a thread about that a while back, no success =/ RE: Prototype method to add functions to objects. by Ezra on 09-02-2006 at 04:41 PM Suggested it at the Api Wishlist RE: Prototype method to add functions to objects. by CookieRevised on 09-02-2006 at 10:34 PM
quote: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: quote:unfortualy not, as they are not true objects, nor constructors. They are interfaces... prototype only works on objects and constructors. |