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:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [IDEA] plusQuery
That is truly amazing! :O

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.

Example:
Javascript code:
$.wrappers.DataBloc.prototype = {
    Size: function (newSize) {
        if( typeof newSize !== "undefined" ) {
            this.original.Size = newSize;
        }
        return this.original.Size;
    }
}

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.

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!...

This deserves its own thread though... :P
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
04-06-2011 09:43 AM
Profile E-Mail PM Web 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