Closed Bug 220770 Opened 21 years ago Closed 21 years ago

Warning: assignment to undeclared variable gNewAccountToLoad

Categories

(SeaMonkey :: MailNews: Account Configuration, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: mnyromyr)

Details

Attachments

(1 file, 3 obsolete files)

Warning: assignment to undeclared variable gNewAccountToLoad
Source File: chrome://messenger/content/accountUtils.js
Line: 206

function msgOpenAccountWizard()
{
  gNewAccountToLoad = null;

  // Check to see if the verify accounts function 
  // was called with callback or not.
  if (gReturnmycall)
      window.openDialog("chrome://messenger/content/AccountWizard.xul",
                        "AccountWizard", "chrome,modal,titlebar,resizable",
{okCallback:WizCallback});
  else
      window.openDialog("chrome://messenger/content/AccountWizard.xul",
                        "AccountWizard", "chrome,modal,titlebar,resizable");

  loadInboxForNewAccount();

  //For the first account we need to reset the default smtp server in the panel.
  var smtpService =
Components.classes["@mozilla.org/messengercompose/smtp;1"].getService(Components.interfaces.nsISmtpService);
  var serverCount = smtpService.smtpServers.Count();
  try{ReloadSmtpPanel();}
  catch(ex){}
}
Attachment #132401 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 132401 [details] [diff] [review]
Patch without my changes for bug 220768

If this is the right place to declare this variable then that means that
msgMail3PaneWindow.js is the wrong place to declare it.
Attachment #132401 - Flags: review?(neil.parkwaycc.co.uk) → review-
taking, as agreed upon on IRC
Assignee: technutz → kd-moz
Attached patch patch (obsolete) — Splinter Review
- moved the definition of gNewAccountToLoad from msgMail3paneWindow.js to
accountUtils.js
- extended msgOpenAccountWizard by an argument to sustain calling context
- changed calls to msgOpenAccountWizard to reflect that
(and I removed an argument in a function call that is useless since its
implementation - the function never had any parameters...)
Attachment #132400 - Attachment is obsolete: true
Attachment #132401 - Attachment is obsolete: true
Attachment #132478 - Flags: review?(neil.parkwaycc.co.uk)
Sorry, I don't see the point of changing msgOpenAccountWizard, explain please?
Attached patch simplified patchSplinter Review
No point there, sorry. :|
I've skipped the unnecessary changes to msgOpenAccountWizard, so that's what
remains:
- moved the definition of gNewAccountToLoad from msgMail3paneWindow.js to
accountUtils.js (gNewAccountToLoad gets only used there and in
AccountWizard.js; AccountWizard.js is only included by AccountWizard.xul, and
accountUtils.js is included there, too)
- removed an argument in a function call that is useless since its
implementation in rev 1.3
Attachment #132478 - Attachment is obsolete: true
Attachment #132478 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #132576 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #132576 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #132576 - Flags: superreview?(bzbarsky)
Comment on attachment 132576 [details] [diff] [review]
simplified patch

sr=bzbarsky
Attachment #132576 - Flags: superreview?(bzbarsky) → superreview+
Checking in prefs/resources/content/accountUtils.js;
/cvsroot/mozilla/mailnews/base/prefs/resources/content/accountUtils.js,v  <--  a
ccountUtils.js
new revision: 1.32; previous revision: 1.31
done
Checking in resources/content/msgMail3PaneWindow.js;
/cvsroot/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js,v  <--  m
sgMail3PaneWindow.js
new revision: 1.250; previous revision: 1.249
done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Verified FIXED with the 2004-08-20-07 build on Windows XP Seamonkey Trunk.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: