Closed Bug 184228 Opened 22 years ago Closed 21 years ago

Spelling error in irc.js: "function net_conenct()".

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: justinarthur, Assigned: rginda)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021115
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021115

This doesn't seem to dramatically affect anything.The spelling error is right here:
     CIRCNetwork.prototype.connect =
     function net_conenct()
     {...}
I'd imagine that "conenct" should be "connect ".

Reproducible: Always

Steps to Reproduce:
not sure about that because there's already a net_connect() function:
http://lxr.mozilla.org/seamonkey/source/extensions/irc/js/lib/irc.js#241
In both cases, they're never used anywhere else anyway...
There are a number of these spelling and copy/paste errors.
If anyone wants to hunt them down, please do.  :-)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Well, they _are_ used, they are only not referenced by their name, but invoked
by a network object's connect() function.
E.g. the misspelled one is invoked from 
http://lxr.mozilla.org/seamonkey/source/extensions/irc/xul/content/static.js#2257

That is the reason why still everything works as expected and renaming generally
is not a problem at all.

However, I don't know enough about JavaScript to decide if correcting the name
will cause an error because there is already a function with this name, but with
different parameter count. Is overloading possible?
Attached patch patchSplinter Review
Renames 'net_conenct' to 'net_connect' and the existing 'net_connect' to
'net_onconnect' (see diff for why).
This avoids confusion and problems with several functions having the same name.


lxr says that 'net_onconnect' is not used in the tree.
Comment on attachment 121559 [details] [diff] [review]
patch

Requesting review from rginda.
I tested it and it ran properly and this is what I expected because the names
of the functions are never called. But you know JS better than me...
Attachment #121559 - Flags: review?(rginda)
If you don't mind, could you look through the files?  There are several more of
these errors.
Samuel, you mean like all chatzilla JavaScript files?
Ummm...
:-)

It's not like one can do an automatic spellcheck on JS files...
I'll offer this one for starters. Maybe I'll read a bit in this file (irc.js),
but...
Comment on attachment 121559 [details] [diff] [review]
patch

I'll include this in the next xpi
Attachment #121559 - Flags: review?(rginda) → review+
marking fixed, 0.8.34 checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: