Closed Bug 102152 Opened 24 years ago Closed 17 years ago

javascript strict warnings in pref-mailnewsOverlay.js

Categories

(MailNews Core :: Simple MAPI, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 121369

People

(Reporter: bugzilla, Assigned: sgautherie)

References

Details

Attachments

(4 obsolete files)

just starting mailnews gives me: Warning: reference to undefined property Components.classes['@mozilla.org/mapiregistry;1'] Source File: chrome://messenger/content/pref-mailnewsOverlay.js Line: 27
QA Contact: esther → stephend
*** Bug 106289 has been marked as a duplicate of this bug. ***
Attached patch (Av1) patch v1 (obsolete) — Splinter Review
Attached patch (Av1a) patch (obsolete) — Splinter Review
Attachment #54768 - Attachment is obsolete: true
Reassigning this bug to myself. Seth, can you review the patch
Assignee: sspitzer → srilatha
Henrik, are you still seeing this bug?
Product: Browser → Seamonkey
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050212] (nightly) (W98SE) {{ Warning: redeclaration of var mailnewsEnableNews Source File: chrome://messenger-mapi/content/pref-mailnewsOverlay.js Line: 54, Column: 12 Source Code: var mailnewsEnableNews = document.getElementById("mailnewsEnableNews"); }}
Target Milestone: --- → mozilla1.8beta1
Attachment #54768 - Attachment description: patch v1 → (Av1) patch v1
Attachment #54770 - Attachment description: patch → (Av2) patch
Attached patch (Bv1) <pref-mailnewsOverlay.js> (obsolete) — Splinter Review
I wonder if {{ var mailnewsEnableMapi = document.getElementById("mailnewsEnableMapi"); var mailnewsEnableNews = document.getElementById("mailnewsEnableNews"); }} could be made global to the file !? Open question: Is {{ + var mapiRegistryProgID = "@mozilla.org/mapiregistry;1" + if (mapiRegistryProgID in Components.classes) { }} from previous uploaded patch "still" needed ? Opening MailNews doesn't show the warning on official releases, but maybe it could on some customized builds ??
Assignee: srilatha → gautheri
Status: NEW → ASSIGNED
Attachment #174336 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 174336 [details] [diff] [review] (Bv1) <pref-mailnewsOverlay.js> >+ mailnewsEnableMapi.setAttribute("checked", >+ parent.mapiPref.isDefaultMailClient ? "true" : "false"); >+ mailnewsEnableNews.setAttribute("checked", >+ parent.mapiPref.isDefaultNewsClient ? "true" : "false"); These should just use the .checked property although setAttribute already uses the obvious string conversion. r=me with this fixed.
Attachment #174336 - Flags: review?(neil.parkwaycc.co.uk) → review+
Severity: normal → minor
Component: MailNews: Main Mail Window → MailNews: Simple MAPI
OS: Windows 2000 → All
Product: Mozilla Application Suite → Core
Hardware: PC → All
Comment on attachment 54770 [details] [diff] [review] (Av1a) patch Neil replied me {{ 1) No, you can't use document.getElementById globally. 2) In theory that should never happen. The "@mozilla.org/mapiregistry;1" component and the pref-mailnewsOverlay.js are part of the same module, so Windows computers should have them both and other computers will have neither. But maybe the reporter had some corruption somewhere. }} Then, dropping initial report (no reply since 2002-05-11), and morphing to the current warning (duped bug 282242).
Attachment #54770 - Attachment description: (Av2) patch → (Av1a) patch
Attachment #54770 - Attachment is obsolete: true
*** Bug 282242 has been marked as a duplicate of this bug. ***
Attached patch (Bv1) <pref-mailnewsOverlay.js> (obsolete) — Splinter Review
Bv1, with comment 8 suggestion(s), and some more. I wonder if |function mailnewsOverlayInit()| could use something like {{ if (prefBranch && prefBranch.prefIsLocked("defaultNewsClient")) { mapiRegistry.isDefaultNewsClient = prefBranch.getBoolPref("defaultNewsClient") ; mailnewsEnableNews.disabled = true; }} or a comment so say why there is not ??
Attachment #174416 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #174336 - Attachment is obsolete: true
Comment on attachment 174416 [details] [diff] [review] (Bv1) <pref-mailnewsOverlay.js> The inability to lock the news preference does look like an oversight.
Attachment #174416 - Flags: review?(neil.parkwaycc.co.uk) → review+
Comment on attachment 174416 [details] [diff] [review] (Bv1) <pref-mailnewsOverlay.js> (In reply to comment #12) > The inability to lock the news preference does look like an oversight. Is fixing this as simple as adding "the" _js_ lines I suggested in my previous comment, or could you point me to a full "example" ? (I'll file a new bug if needed...)
Attachment #174416 - Flags: superreview?(dmose)
Comment on attachment 174416 [details] [diff] [review] (Bv1) <pref-mailnewsOverlay.js> I think your proposed changes to lock those prefs look fine. sr=dmose with or without those changes.
Attachment #174416 - Flags: superreview?(dmose) → superreview+
(In reply to comment #14) > (From update of attachment 174416 [details] [diff] [review] [edit]) > I think your proposed changes to lock those prefs look fine. sr=dmose with or > without those changes. Noted: I'll prepare an additional patch based on comment 11, in the future...
Whiteboard: [SG, ToDo before closing: comment 15]
Comment on attachment 174416 [details] [diff] [review] (Bv1) <pref-mailnewsOverlay.js> 'approval1.8b2=?': Trivial U.I. code cleanup, no risk. This should be MailNews specific !?
Attachment #174416 - Flags: approval1.8b2?
Comment on attachment 174416 [details] [diff] [review] (Bv1) <pref-mailnewsOverlay.js> try again when we're not so close to a release.
Attachment #174416 - Flags: approval1.8b2? → approval1.8b2-
Blocks: 296661
No longer blocks: 296661
Comment on attachment 174416 [details] [diff] [review] (Bv1) <pref-mailnewsOverlay.js> Obsoleting: this patch never got checked in :-( (See bug 121369, which bitrotted/superseded this patch.)
Attachment #174416 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Whiteboard: [SG, ToDo before closing: comment 15]
Target Milestone: mozilla1.8beta1 → ---
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: