What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » WLM Plus! General » [sug-script] Trace error with duplicate function names

[sug-script] Trace error with duplicate function names
Author: Message:
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. [sug-script] Trace error with duplicate function names
Hi,

Isn't it an idea to have Plus! trace an error if a function name is used more than once?

This post was edited on 09-18-2008 at 04:12 PM by SmokingCookie.
09-18-2008 03:56 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: [sug-script] Trac error with duplicate function names
Not really... If anything it could generate a warning in the debug window. IIRC using duplicate functions does not cause an error, but just uses the last instance of the function that has been defined (as if it has over-written the pevious function). The same happens for events I think; I can't check I'm at work
<Eljay> "Problems encountered: shit blew up" :zippy:
09-18-2008 04:11 PM
Profile PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: RE: [sug-script] Trace error with duplicate function names
quote:
Originally posted by SpunkyLoveMuff
IIRC using duplicate functions does not cause an error, but just uses the last instance of the function that has been defined (as if it has over-written the pevious function).

Or no events are called any more.....

This post was edited on 09-18-2008 at 04:17 PM by SmokingCookie.
09-18-2008 04:16 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: [sug-script] Trace error with duplicate function names
If that is the case, I'm sure I could make something that would alert you somehow...
<Eljay> "Problems encountered: shit blew up" :zippy:
09-18-2008 06:25 PM
Profile PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: [sug-script] Trace error with duplicate function names
Yeah, but I think Pathcou should make something in Plus! itself to alert scripters.. But that's just my opinion.
09-18-2008 06:34 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [sug-script] Trace error with duplicate function names
In my honest opinion this shouldn't be added into the scripting engine. It is the developers responsibility to know what functions have been coded and what ones need to be coded. If something like this was added then where would addidtions to the engine stop?

When I found the problem with your script I commented everything out in the main js file and added a debug line to the Initialize. When it still didn't print out I removed every other .js file and slowly one by one added them back and restarted the script eachtime. When the script no longer would debug anything I knew the problem was with the file itself. So I commented every function and slowly uncommented 1 at a time to see what function was causing the problem. When I came across the duplicate function I knew what the problem was. This probably took me maybe 5 minutes.
09-18-2008 07:11 PM
Profile E-Mail PM Find Quote Report
Burningmace
Junior Member
**


Posts: 20
Joined: Sep 2008
RE: [sug-script] Trace error with duplicate function names
The only place that features like this should be placed is in an IDE. If you want to go ahead and code one then feel free, otherwise just remember what function names you have used and what names you haven't.

In fact the feature request here should be that the scripting language (is it JavaScript?) should support overloading methods! If JavaScript is indeed used, then send that request over to Microsoft or whoever the hell regulates that god-awful language these days.
09-23-2008 10:38 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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