What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Global Window-handler possible?

Global Window-handler possible?
Author: Message:
RdeWilde
New Member
*


Posts: 5
Joined: May 2008
O.P. RE: Global Window-handler possible?
Thanks for clearing up some things. I understand where you're going, but that's exactly what I'm trying to prevent. The multidimensional array you name it, is an object in my code. It won't take more memmory, it's even more compact than writing out each seperate window.

If you take a close look at my code, you'll notive my constructor takes the argument of windows and elements, combined with a function to execute:
code:
new cWindow(
  {'__OS_wndCalender':
    {'__OS_btnStatusSave' : function()
       {
          MsgPlus.DisplayToast('Made IT!');
       }
    }
  }
);

Here you have the structure of all elements (defined just one here, but could be a lot more) inside of all windows, which are filled with the function to execute. It could also include a reference to execute another part of the script, which makes the code flexible.

Another advantage of this object-collection is that I could easily make a function to manage the elements and windows. I have the openWindow function, which will make every new window available to this control. Thereby I could add a function to each window like 'addElementControl', which'll give me the feature to dynamically add (handling of) control-elements.

In the code you're showing as an alternative, there's no such possibility. I'll have to hardcore every change and every action in seperate functies. I think it's LESS readable and workable instead of a nice collection, but that's indeed just a personal opinion.

I'll keep thinking about the handling. I've been trying to dynamically create the functions to handle the windows and reference them to the global one, but i don't think that'll be a nice workaround....
06-03-2008 02:28 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Global Window-handler possible? - by RdeWilde on 06-03-2008 at 10:20 AM
RE: Global Window-handler possible? - by markee on 06-03-2008 at 10:56 AM
RE: Global Window-handler possible? - by RdeWilde on 06-03-2008 at 11:23 AM
RE: Global Window-handler possible? - by markee on 06-03-2008 at 12:42 PM
RE: Global Window-handler possible? - by RdeWilde on 06-03-2008 at 02:28 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