Closed
Bug 102152
Opened 24 years ago
Closed 17 years ago
javascript strict warnings in pref-mailnewsOverlay.js
Categories
(MailNews Core :: Simple MAPI, defect)
MailNews Core
Simple MAPI
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
| Reporter | ||
Comment 1•24 years ago
|
||
*** Bug 106289 has been marked as a duplicate of this bug. ***
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
Updated•24 years ago
|
Attachment #54768 -
Attachment is obsolete: true
Comment 4•24 years ago
|
||
Reassigning this bug to myself.
Seth, can you review the patch
Assignee: sspitzer → srilatha
Comment 5•23 years ago
|
||
Henrik, are you still seeing this bug?
Updated•20 years ago
|
Product: Browser → Seamonkey
| Assignee | ||
Comment 6•20 years ago
|
||
[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
| Assignee | ||
Updated•20 years ago
|
Attachment #54768 -
Attachment description: patch v1 → (Av1) patch v1
| Assignee | ||
Updated•20 years ago
|
Attachment #54770 -
Attachment description: patch → (Av2) patch
| Assignee | ||
Comment 7•20 years ago
|
||
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 8•20 years ago
|
||
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+
| Assignee | ||
Updated•20 years ago
|
Severity: normal → minor
Component: MailNews: Main Mail Window → MailNews: Simple MAPI
OS: Windows 2000 → All
Product: Mozilla Application Suite → Core
Hardware: PC → All
| Assignee | ||
Comment 9•20 years ago
|
||
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
| Assignee | ||
Comment 10•20 years ago
|
||
*** Bug 282242 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 11•20 years ago
|
||
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)
| Assignee | ||
Updated•20 years ago
|
Attachment #174336 -
Attachment is obsolete: true
Comment 12•20 years ago
|
||
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+
| Assignee | ||
Comment 13•20 years ago
|
||
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 14•20 years ago
|
||
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+
| Assignee | ||
Comment 15•20 years ago
|
||
(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]
| Assignee | ||
Comment 16•20 years ago
|
||
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 17•20 years ago
|
||
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-
| Assignee | ||
Comment 18•17 years ago
|
||
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
| Assignee | ||
Comment 19•17 years ago
|
||
Bug 121369 even added comment 11.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Whiteboard: [SG, ToDo before closing: comment 15]
| Assignee | ||
Updated•17 years ago
|
Target Milestone: mozilla1.8beta1 → ---
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•