What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [IDEA] plusQuery

[IDEA] plusQuery
Author: Message:
Amec
Junior Member
**


Posts: 19
32 / Male / Flag
Joined: Sep 2008
O.P. RE: RE: [IDEA] plusQuery
quote:
Originally posted by Matti
That is truly amazing! :O
Thanks. :D

quote:
Originally posted by Matti
Here's a suggestion: use combined getter/setter methods for the properties in the wrapper classes. Instead of storing this.original.Size in this.Size, make a method Size which can be called as a getter with Size() or as a setter with Size(newSize). Right now every wrapped property is read-only, although some properties should be read/write such as DataBloc.Size or Messenger.MyStatus.
Hmm, I just tested this... I guess it's something I overlooked. Oops! I'll change them all to the combined getter/setter functions as you suggested soon.

quote:
Originally posted by Matti
Another thing I noticed is that you're extending Object.prototype. While this may work just fine in your library when using your version of Object.prototype.forEach, this surely will break a lot of scripts which iterate over plain objects using a standard for...in loop without the Object.prototype.hasOwnProperty check. I think it's better to simply drop the prototype extensions and only extend the static Object. This is not so much of an issue with the Array and String prototypes, as those should never be iterated over with for...in anyway.
Yeah, I realised that was terrible after I started to REALLY understand ECMAScript... Haven't had time to move them from Object to plusQuery yet. And people who don't check for hasOwnProperty while iterating are silly. But... I guess I have to take that into account. :P

quote:
Originally posted by Matti
The thing I miss is (of course) event binding on PlusWnd objects. If this were possible, we could write classes to work with window controls which can bind the necessary handlers to the used window events. Now, I understand that this is very tough to implement and would probably require a lot of hackish constructions. I found a way to inject function in the global object in run-time, but it's very, very ugly. :P Hopefully the event architecture gets fixed/improved in some future version of Plus!...
Yeah, I thought about it for a bit, and had no idea. The global variable in JScript seems REALLY screwey. :( Doesn't seem to be a way that I can see which adds properties to it.
js code:
function OnMyWndEvent_Cancel(plusWnd) {
    $.trigger(plusWnd, "MyWndEvent_Cancel", plusQuery.$A(arguments));
}

$.addEventListener("MyWndEvent_Cancel", function (plusWnd) {
    //do stuff here
});

$.addEventListener("MyWndEvent_Cancel", function (plusWnd) {
    //do other stuff here
});
It would be so much easier if you could just add it to the global variable. :( How did you manage to do it?

This post was edited on 04-06-2011 at 11:24 AM by Amec.
04-06-2011 11:12 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[IDEA] plusQuery - by Amec on 07-13-2010 at 04:43 AM
RE: [IDEA] plusQuery - by Spunky on 07-13-2010 at 06:29 AM
RE: [IDEA] plusQuery - by Matti on 07-13-2010 at 07:55 AM
RE: [IDEA] plusQuery - by CookieRevised on 07-13-2010 at 11:47 PM
RE: [IDEA] plusQuery - by Matti on 07-14-2010 at 10:28 AM
RE: [IDEA] plusQuery - by Amec on 04-06-2011 at 04:34 AM
RE: [IDEA] plusQuery - by Matti on 04-06-2011 at 09:43 AM
RE: RE: [IDEA] plusQuery - by Amec on 04-06-2011 at 11:12 AM
RE: [IDEA] plusQuery - by matty on 04-06-2011 at 12:46 PM
RE: [IDEA] plusQuery - by Amec on 04-06-2011 at 02:07 PM
RE: [IDEA] plusQuery - by Matti on 04-06-2011 at 03:03 PM
RE: RE: [IDEA] plusQuery - by Amec on 04-06-2011 at 04:11 PM
RE: [IDEA] plusQuery - by matty on 04-06-2011 at 05:19 PM
RE: [IDEA] plusQuery - by Eljay on 04-06-2011 at 06:03 PM
RE: [IDEA] plusQuery - by Matti on 04-06-2011 at 06:11 PM
RE: [IDEA] plusQuery - by Eljay on 04-06-2011 at 06:20 PM
RE: [IDEA] plusQuery - by CookieRevised on 04-06-2011 at 10:27 PM
RE: [IDEA] plusQuery - by Amec on 04-07-2011 at 05:43 AM
RE: [IDEA] plusQuery - by CookieRevised on 04-07-2011 at 09:36 AM


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