Open
Bug 219509
Opened 21 years ago
Updated 16 years ago
undeclared variable and using alert instead of the promptservice
Categories
(SeaMonkey :: MailNews: Account Configuration, defect)
SeaMonkey
MailNews: Account Configuration
Tracking
(Not tracked)
NEW
People
(Reporter: timeless, Unassigned)
References
Details
Attachments
(2 obsolete files)
@see bug 138302 chrome://messenger/content/AccountWizard.js line 87: assignment to undeclared variable gDefaultSpecialFolderPickerMode ###!!! ASSERTION: You are calling CreateInstance "{a2112d6a-0e28-421f-b46a-25c0b308cbd0}" when a service for this CID already exists!: 'Error', file i:/build/mozilla/xpcom/components/nsComponentManager.cpp, line 1952
Status: NEW → ASSIGNED
Summary: undeclared variable and using service as instance → undeclared variable and using alert instead of the promptservice
Attachment #131625 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 2•21 years ago
|
||
Comment on attachment 131625 [details] [diff] [review] declare variable and use the promptservice >-var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); >-promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService); >+var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); Nit: const > // default picker mode for copies and folders >-gDefaultSpecialFolderPickerMode = "0"; >+var gDefaultSpecialFolderPickerMode = "0"; hmmm... const, really... >+var gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]. >+ getService(Components.interfaces.nsIPromptService); Redeclaration, surely? >+function Alert(alertText){ >+gPromptService.alert(document.window, document.title, alertText); >+} document.window? I don't think that's defined, just use window. >- var alertText = gPrefsBundle.getString("enterName"); >- window.alert(alertText); >+ Alert(gPrefsBundle.getString("enterName")); Nice cleanup but you could rename the method and move the getString into it. What about the other aw-*.js, did you forget to diff them?
Attachment #131625 -
Flags: review?(neil.parkwaycc.co.uk) → review-
Updated•20 years ago
|
Assignee: timeless → Stefan.Borggraefe
Status: ASSIGNED → NEW
Comment 3•20 years ago
|
||
The undeclared variable part of this bug is already fixed. window.alert is still used in: /mailnews/base/prefs/resources/content/aw-accname.js /mailnews/base/prefs/resources/content/aw-done.js /mailnews/base/prefs/resources/content/aw-identity.js /mailnews/base/prefs/resources/content/aw-login.js /mailnews/base/prefs/resources/content/aw-server.js
Severity: normal → minor
Status: NEW → ASSIGNED
OS: Windows 2000 → All
Hardware: PC → All
Comment 4•20 years ago
|
||
This patch does the following: 1. Use promptservice instead of alert(). 2. After a failed validity check, returns the focus to the element on which the check failed. 3. Corrects all JavaScript Warnings in the Account Wizard (there were a lot).
Attachment #131625 -
Attachment is obsolete: true
Updated•20 years ago
|
Attachment #145608 -
Flags: review?(neil.parkwaycc.co.uk)
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 5•20 years ago
|
||
Comment on attachment 145608 [details] [diff] [review] Patch Patch bitrotted.
Attachment #145608 -
Flags: review?(neil.parkwaycc.co.uk)
Updated•20 years ago
|
Attachment #145608 -
Attachment is obsolete: true
Updated•16 years ago
|
Assignee: Stefan.Borggraefe → mail
Status: ASSIGNED → NEW
QA Contact: nbaca
Comment 6•16 years ago
|
||
Could you check what is left of this bug (and patch) ? (Now that bug 146392 is fixed.)
Depends on: 146392
Comment 7•16 years ago
|
||
AFAIK only the removal of the unused function from aw-done.js is left.
You need to log in
before you can comment on or make changes to this bug.
Description
•