What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Pass object to a Wnd

Pass object to a Wnd
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Pass object to a Wnd
quote:
Originally posted by Shondoit
Well, actually, Cooldude wants the same as me, to pass parameters to the PlusWnd object...

Only he wants to pass a method, and I want to pass an Object
Which are totally two different things...

1) You don't pass methods, you add methods to existing objects.

A method is a function. It makes no sense to "pass" it to another object. "Passing" is a term used in context of variables and functions.

2) You don't pass stuff to windows, you pass stuff to functions.

A window isn't something which can perform stuff; it's a dead thing only visible on the screen. The functions supporting the window can perform stuff. Hence it makes no sense to pass something to "a window". You pass something to the function which controls the window.

And for this you don't need any fancy thing at all, just a global variable (which holds the object or whatever else) since those are the things which are "passed" to and used between functions.


So, the two things asked are in fact two different things (unless you or cooldude described something different than what you actually wanted).

;)

As for your own problem, Shondoit, a detailed (pseudo-) code example would be very helpfull in explaining to us what you actually are trying to accomplish. And maybe in that way I also can explain better that the thing you ask for and what cooldude asks for is actually totally different.

---

To add your own methods to objects, you use the prototype method. eg:
code:
String.prototype.trim = function() {
    return this.replace(/(^\s|\s$/g, "");
}
will add a trim method to the string object.

Note that the stuff which Plus! adds to JScript aren't objects but mainly interfaces, you can not use the protoype method to add your own methods to them...

This post was edited on 12-29-2006 at 11:45 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-13-2006 06:10 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Pass object to a Wnd - by Shondoit on 08-11-2006 at 01:56 PM
RE: Pass object to a Wnd - by -dt- on 08-11-2006 at 02:09 PM
RE: Pass object to a Wnd - by Shondoit on 08-11-2006 at 02:12 PM
RE: Pass object to a Wnd - by -dt- on 08-11-2006 at 02:16 PM
RE: Pass object to a Wnd - by CookieRevised on 08-11-2006 at 06:10 PM
RE: Pass object to a Wnd - by Shondoit on 08-11-2006 at 10:58 PM
RE: Pass object to a Wnd - by cooldude_i06 on 08-12-2006 at 05:40 AM
RE: RE: Pass object to a Wnd - by CookieRevised on 08-13-2006 at 09:28 AM
RE: Pass object to a Wnd - by Shondoit on 08-13-2006 at 12:46 PM
RE: Pass object to a Wnd - by CookieRevised on 08-13-2006 at 06:10 PM
RE: Pass object to a Wnd - by Shondoit on 08-13-2006 at 06:25 PM
RE: Pass object to a Wnd - by cooldude_i06 on 08-13-2006 at 06:44 PM
RE: RE: Pass object to a Wnd - by Shondoit on 08-13-2006 at 06:47 PM
RE: Pass object to a Wnd - by cooldude_i06 on 08-13-2006 at 06:54 PM
RE: RE: Pass object to a Wnd - by CookieRevised on 08-13-2006 at 10:27 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