commondialog service is being replaced by promptservice. bug 72112 continues

This commit is contained in:
danm%netscape.com 2001-04-09 02:08:05 +00:00
Родитель 39001feccd
Коммит 9751b284ab
21 изменённых файлов: 88 добавлений и 102 удалений

Просмотреть файл

@ -25,8 +25,8 @@
/* Implementations of nsIControllerCommand for composer commands */
var commonDialogsService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogsService = commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
//-----------------------------------------------------------------------------------
function SetupHTMLEditorCommands()
@ -375,7 +375,7 @@ var nsRevertCommand =
doCommand: function(aCommand)
{
// Confirm with the user to abandon current changes
if (commonDialogsService)
if (promptService)
{
var result = {value:0};
@ -386,7 +386,7 @@ var nsRevertCommand =
var msg = window.editorShell.GetString("AbandonChanges").replace(/%title%/,title);
commonDialogsService.UniversalDialog(
promptService.UniversalDialog(
window,
null,
window.editorShell.GetString("RevertCaption"),

Просмотреть файл

@ -393,7 +393,7 @@ function CheckAndSaveDocument(reasonToSave, allowDontSave)
dialogMsg = (dialogMsg.replace(/%title%/,title)).replace(/%reason%/,reasonToSave);
var result = {value:0};
commonDialogsService.UniversalDialog(
promptService.UniversalDialog(
window,
null,
dialogTitle,

Просмотреть файл

@ -593,11 +593,9 @@ function myPrompt(message, oldValue, title) {
if (!title) {
title = " ";
}
var commonDialogService =
Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogService =
commonDialogService.QueryInterface(Components.interfaces.nsICommonDialogs);
commonDialogService.Prompt(window, title, message, oldValue, newValue)
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
promptService.Prompt(window, title, message, "", 0, oldValue, newValue)
return newValue.value;
}

Просмотреть файл

@ -247,10 +247,8 @@ function AbDeleteDirectory()
{
dump("\AbDeleteDirectory from XUL\n");
var commonDialogsService
= Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogsService
= commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
var selArray = dirTree.selectedItems;
var count = selArray.length;
@ -288,9 +286,9 @@ function AbDeleteDirectory()
}
else
{
if (commonDialogsService)
if (promptService)
{
commonDialogsService.Alert(window,
promptService.Alert(window,
gAddressBookBundle.getString("cannotDeleteTitle"),
gAddressBookBundle.getString("cannotDeleteMessage"));
}

Просмотреть файл

@ -84,8 +84,8 @@ var accountCount = accounts.Count();
var nsIMsgIdentity = Components.interfaces.nsIMsgIdentity;
var nsIMsgIncomingServer = Components.interfaces.nsIMsgIncomingServer;
var gPrefsBundle;
var commonDialogsService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogsService = commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
// the current nsIMsgAccount
var gCurrentAccount;
@ -172,7 +172,7 @@ function onCancel()
if (!(accountCount > 0)) {
var confirmTitle = gPrefsBundle.getString("accountWizard");
var confirmMsg = gPrefsBundle.getString("cancelWizard");
if (commonDialogsService.Confirm(window,confirmTitle,confirmMsg))
if (promptService.Confirm(window,confirmTitle,confirmMsg))
window.close();
else
return;

Просмотреть файл

@ -661,9 +661,8 @@ function ConfirmUnsubscribe(folder)
var dialogMsg = gMessengerBundle.getFormattedString("confirmUnsubscribeText",
[folder.name], 1);
var commonDialogService = nsJSComponentManager.getService("@mozilla.org/appshell/commonDialogs;1",
"nsICommonDialogs");
return commonDialogService.Confirm(window, titleMsg, dialogMsg);
var promptService = nsJSComponentManager.getService("@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService");
return promptService.Confirm(window, titleMsg, dialogMsg);
}
function MsgUnsubscribe()

Просмотреть файл

@ -22,8 +22,8 @@
//NOTE: gMessengerBundle must be defined and set or this Overlay won't work
var commonDialogs = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogs = commonDialogs.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
@ -150,7 +150,7 @@ function CrossFolderNavigation(type, supportsFolderPane )
case 1:
default:
var promptText = gMessengerBundle.getFormattedString("advanceNextPrompt", [ nextFolder.name ], 1);
if (commonDialogs.Confirm(window, promptText, promptText)) {
if (promptService.Confirm(window, promptText, promptText)) {
gNextMessageAfterLoad = type;
if (supportsFolderPane)
SelectFolder(nextFolderURI);

Просмотреть файл

@ -68,14 +68,12 @@ function onOk()
{
if (isDuplicateFilterNameExists())
{
var commonDialogsService
= Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogsService
= commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
if (commonDialogsService)
if (promptService)
{
commonDialogsService.Alert(window,
promptService.Alert(window,
gFilterBundle.getString("cannotHaveDuplicateFilterTitle"),
gFilterBundle.getString("cannotHaveDuplicateFilterMessage")
);

Просмотреть файл

@ -28,16 +28,14 @@ var reorderDownButton;
const nsMsgFilterMotion = Components.interfaces.nsMsgFilterMotion;
var gFilterBundle;
var gCommonDialogsService;
var gPromptService;
function onLoad()
{
rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
gCommonDialogsService
= Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
gCommonDialogsService
= gCommonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
var gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
gPromptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
gFilterBundle = document.getElementById("bundle_filter");

Просмотреть файл

@ -30,8 +30,8 @@ var plainobj = null //new Object();
//plainobj.treeroot_node = void 0; //dom element of plaintextdomain treechildren
//plainobj.domain_pref = void 0; // dom element of the broadcaster mailplaintextdomain
var commonDialogsService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogsService = commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
function Init()
@ -70,13 +70,15 @@ function Init()
function AddDomain(obj)
{
var DomainName;
if (commonDialogsService)
if (promptService)
{
var result = {value:0};
if (commonDialogsService.Prompt(
if (promptService.Prompt(
window,
obj.DlgTitle,
obj.DlgMsg,
"",
0,
null,
result
))
@ -142,8 +144,8 @@ function DomainAlreadyPresent(obj, domain_name, dup)
else
errorMsg = document.getElementById("domainerrdlg").getAttribute("dualerr");
var errorMessage = errorMsg.replace(/@string@/, domain_name);
if (commonDialogsService)
commonDialogsService.Alert(window, errorTitle, errorMessage);
if (promptService)
promptService.Alert(window, errorTitle, errorMessage);
else
window.alert(errorMessage);
found = true;

Просмотреть файл

@ -36,8 +36,8 @@ var messengerMigratorContractID = "@mozilla.org/messenger/migrator;1";
var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
var commonDialogsService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogsService = commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
var ioService = Components.classesByID["{9ac9e770-18bc-11d3-9337-00104ba0fd40}"].getService();
ioService = ioService.QueryInterface(Components.interfaces.nsIIOService);
@ -850,8 +850,8 @@ function ComposeLoad()
var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle");
var errorMsg = gComposeMsgsBundle.getString("initErrorDlogMessage");
errorMsg = errorMsg.replace(/%1\$s/, ex);
if (commonDialogsService)
commonDialogsService.Alert(window, errorTitle, errorMsg);
if (promptService)
promptService.Alert(window, errorTitle, errorMsg);
else
window.alert(errorMsg);
@ -1042,13 +1042,14 @@ function GenericSendMessage( msgType )
//Check if we have a subject, else ask user for confirmation
if (subject == "")
{
if (commonDialogsService)
if (promptService)
{
var result = {value:0};
if (commonDialogsService.Prompt(
if (promptService.Prompt(
window,
gComposeMsgsBundle.getString("subjectDlogTitle"),
gComposeMsgsBundle.getString("subjectDlogMessage"),
"", 0,
gComposeMsgsBundle.getString("defaultSubject"),
result
))
@ -1401,10 +1402,10 @@ function ComposeCanClose()
// and therefore need to be visible (to prevent user confusion)
window.focus();
if (commonDialogsService)
if (promptService)
{
var result = {value:0};
commonDialogsService.UniversalDialog(
promptService.UniversalDialog(
window,
null,
gComposeMsgsBundle.getString("saveDlogTitle"),
@ -1480,8 +1481,8 @@ function AttachFile()
var errorTitle = gComposeMsgsBundle.getString("DuplicateFileErrorDlogTitle");
var errorMsg = gComposeMsgsBundle.getString("DuplicateFileErrorDlogMessage");
if (commonDialogsService)
commonDialogsService.Alert(window, errorTitle, errorMsg);
if (promptService)
promptService.Alert(window, errorTitle, errorMsg);
else
window.alert(errorMsg);
}
@ -1514,13 +1515,14 @@ function AddAttachment(attachment, prettyName)
function AttachPage()
{
if (commonDialogsService)
if (promptService)
{
var result = {value:0};
if (commonDialogsService.Prompt(
if (promptService.Prompt(
window,
gComposeMsgsBundle.getString("attachPageDlogTitle"),
gComposeMsgsBundle.getString("attachPageDlogMessage"),
"", 0,
null,
result))
{
@ -1837,8 +1839,8 @@ var attachmentBucketObserver = {
var errorTitle = gComposeMsgsBundle.getString("DuplicateFileErrorDlogTitle");
var errorMsg = gComposeMsgsBundle.getString("DuplicateFileErrorDlogMessage");
if (commonDialogsService)
commonDialogsService.Alert(window, errorTitle, errorMsg);
if (promptService)
promptService.Alert(window, errorTitle, errorMsg);
else
window.alert(errorMsg);
}
@ -1900,8 +1902,8 @@ function DisplaySaveFolderDlg(folderURI)
var newMessage = DlgMsg.replace(/@FolderName@/, msgfolder.name);
var SaveDlgMsg = newMessage.replace(/@HostName@/, msgfolder.hostname);
if (commonDialogsService)
commonDialogsService.AlertCheck(window, SaveDlgTitle, SaveDlgMsg, CheckMsg, checkbox);
if (promptService)
promptService.AlertCheck(window, SaveDlgTitle, SaveDlgMsg, CheckMsg, checkbox);
else
window.alert(SaveDlgMsg);
try {

Просмотреть файл

@ -25,8 +25,7 @@
//NOTE: This script expects gBrandBundle and gProfileManagerBundle to be
// instanciated elsewhere (currently from StartUp in profileSelection.js)
var commonDialogService = nsJSComponentManager.getService("@mozilla.org/appshell/commonDialogs;1",
"nsICommonDialogs");
var promptService = nsJSComponentManager("@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService");
var profileManagerMode = "selection";
var set = null;
@ -63,7 +62,7 @@ function RenameProfile()
lString = lString.replace(/\s*<html:br\/>/g,"\n");
lString = lString.replace(/%brandShortName%/, gBrandBundle.getString("brandShortName"));
var title = gProfileManagerBundle.getString("migratetitle");
if (commonDialogService.Confirm(window, title, lString))
if (promptService.Confirm(window, title, lString))
profile.migrateProfile( profilename, true );
else
return false;
@ -75,7 +74,7 @@ function RenameProfile()
var msg = gProfileManagerBundle.getString("renameProfilePrompt");
msg = msg.replace(/%oldProfileName%/gi, oldName);
while (1) {
var rv = commonDialogService.Prompt(window, dialogTitle, msg, oldName, result);
var rv = promptService.Prompt(window, dialogTitle, msg, "", 0, oldName, result);
if (rv) {
var newName = result.value;
if (!newName) return false;
@ -102,7 +101,7 @@ function RenameProfile()
catch(e) {
var lString = gProfileManagerBundle.getString("profileExists");
var profileExistsTitle = gProfileManagerBundle.getString("profileExistsTitle");
commonDialogService.Alert(window, profileExistsTitle, lString);
promptService.Alert(window, profileExistsTitle, lString);
continue;
}
}
@ -130,7 +129,7 @@ function ConfirmDelete()
lString = lString.replace(/\s*<html:br\/>/g,"\n");
lString = lString.replace(/%brandShortName%/, gBrandBundle.getString("brandShortName"));
var title = gProfileManagerBundle.getString("deletetitle");
if (commonDialogService.Confirm(window, title, lString)) {
if (promptService.Confirm(window, title, lString)) {
profile.deleteProfile( name, false );
var profileKids = document.getElementById( "profilekids" )
profileKids.removeChild( selected );
@ -170,7 +169,7 @@ function ConfirmMigrateAll()
{
var string = gProfileManagerBundle.getString("migrateallprofiles");
var title = gProfileManagerBundle.getString("migrateallprofilestitle");
if (commonDialogService.Confirm(window, title, string))
if (promptService.Confirm(window, title, string))
return true;
else
return false;

Просмотреть файл

@ -172,7 +172,7 @@ function onStart()
gBrandBundle.getString("brandShortName"));
var title = gProfileManagerBundle.getString("migratetitle");
if (commonDialogService.Confirm(window, title, lString))
if (promptService.Confirm(window, title, lString))
profile.migrateProfile( profilename, true );
else
return false;

Просмотреть файл

@ -303,15 +303,14 @@ var homeButtonObserver = {
onDrop: function (aEvent, aXferData, aDragSession)
{
var url = retrieveURLFromData(aXferData.data, aXferData.flavour.contentType);
var commonDialogService = Components.classes["@mozilla.org/appshell/commonDialogs;1"]
.getService(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var pressedVal = { };
var promptTitle = gNavigatorBundle.getString("droponhometitle");
var promptMsg = gNavigatorBundle.getString("droponhomemsg");
var okButton = gNavigatorBundle.getString("droponhomeokbutton");
var iconURL = "chrome://navigator/skin/home.gif"; // evil evil common dialog code! evil!
commonDialogService.UniversalDialog(window, null, promptTitle, promptMsg, null,
promptService.UniversalDialog(window, null, promptTitle, promptMsg, null,
okButton, null, null, null, null, null, { }, { },
iconURL, { }, 2, 0, null, pressedVal);

Просмотреть файл

@ -74,15 +74,13 @@
} else {
// more than one value, have user select the one he wants
var commonDialogService =
Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogService =
commonDialogService.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
var position = {};
var title = " ";
var message = "";
var ok =
commonDialogService.Select
promptService.Select
(window, title, message, valueList.length, valueList, position)
if (ok) {
target.value = valueList[position.value];

Просмотреть файл

@ -297,9 +297,8 @@ function onOK()
errorMessage = gFilePickerBundle.getFormattedString("saveParentDoesntExistMessage",
[oldParent.unicodePath, file.unicodePath]);
}
var commonDialogs = Components.classes["@mozilla.org/appshell/commonDialogs;1"]
.getService(Components.interfaces.nsICommonDialogs);
commonDialogs.Alert(window, errorTitle, errorMessage);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
promptService.Alert(window, errorTitle, errorMessage);
ret = nsIFilePicker.returnCancel;
}
}

Просмотреть файл

@ -157,9 +157,8 @@
var titleMsg = gPrefApplicationsBundle.getString("handlerExistsTitle");
var dialogMsg = gPrefApplicationsBundle.getString("handlerExists");
dialogMsg = dialogMsg.replace(/%mime%/g, gMIMEField.value);
var commonDialogService = Components.classes["@mozilla.org/appshell/commonDialogs;1"]
.getService(Components.interfaces.nsICommonDialogs);
var replace = commonDialogService.Confirm(window, titleMsg, dialogMsg);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var replace = promptService.Confirm(window, titleMsg, dialogMsg);
if (!replace)
window.close();

Просмотреть файл

@ -64,9 +64,8 @@ function onOK()
var titleMsg = gPrefApplicationsBundle.getString("handlerExistsTitle");
var dialogMsg = gPrefApplicationsBundle.getString("handlerExists");
dialogMsg = dialogMsg.replace(/%mime%/g, gMIMEField.value);
var commonDialogService = Components.classes["@mozilla.org/appshell/commonDialogs;1"]
.getService(Components.interfaces.nsICommonDialogs);
var replace = commonDialogService.Confirm(window, titleMsg, dialogMsg);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var replace = promptService.Confirm(window, titleMsg, dialogMsg);
if (!replace)
window.close();
}

Просмотреть файл

@ -26,9 +26,8 @@ function removeType()
var titleMsg = gPrefApplicationsBundle.getString("removeHandlerTitle");
var dialogMsg = gPrefApplicationsBundle.getString("removeHandler");
dialogMsg = dialogMsg.replace(/%n/g, "\n");
var commonDialogService = Components.classes["@mozilla.org/appshell/commonDialogs;1"]
.getService(Components.interfaces.nsICommonDialogs);
var remove = commonDialogService.Confirm(window, titleMsg, dialogMsg);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var remove = promptService.Confirm(window, titleMsg, dialogMsg);
if (remove) {
var uri = gTree.selectedItems[0].id;
var handlerOverride = new HandlerOverride(uri);

Просмотреть файл

@ -28,8 +28,8 @@
// global(s)
var bundle = srGetStrBundle("chrome://communicator/locale/search/search-editor.properties");
var commonDialogsService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogsService = commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
var pref = null;
var RDF = null;
var RDFC = null;
@ -447,7 +447,7 @@ function NewCategory()
var promptStr = bundle.GetStringFromName("NewCategoryPrompt");
var newTitle = bundle.GetStringFromName("NewCategoryTitle");
var result = {value:0};
var name = commonDialogsService.Prompt(window, newTitle, promptStr,"",result);
var name = promptService.Prompt(window, newTitle, promptStr, "", 0, "",result);
if ((!result.value) || result.value == "") return(false);
var newName = RDF.GetLiteral(result.value);
@ -499,7 +499,7 @@ function RenameCategory()
var promptStr = bundle.GetStringFromName("RenameCategoryPrompt");
var renameTitle = bundle.GetStringFromName("RenameCategoryTitle");
var result = {value:0};
var name = commonDialogsService.Prompt(window,renameTitle,promptStr,currentName,result);
var name = promptService.Prompt(window,renameTitle,promptStr,"",0,currentName,result);
if ((!result.value) || (result.value == "") || result.value == currentName) return(false);
var currentCatID = categoryList.selectedItem.getAttribute("id");

Просмотреть файл

@ -142,10 +142,11 @@ function (aTitle, aContentURL, aCustomizeURL)
dialogMessage = aContentURL + " already exists in My Sidebar.";
}
var cDlgService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
if (cDlgService)
cDlgService = cDlgService.QueryInterface(Components.interfaces.nsICommonDialogs);
cDlgService.Alert(this.window, titleMessage, dialogMessage);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
if (promptService) {
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
promptService.Alert(this.window, titleMessage, dialogMessage);
}
return;
}
@ -166,10 +167,9 @@ function (aTitle, aContentURL, aCustomizeURL)
dialogMessage = "Add the Tab '" + aTitle + "' to My Sidebar?\n\n" + "Source: " + aContentURL;
}
var cDlgService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
if (cDlgService)
cDlgService = cDlgService.QueryInterface(Components.interfaces.nsICommonDialogs);
var rv = cDlgService.Confirm(this.window, titleMessage, dialogMessage);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
var rv = promptService.Confirm(this.window, titleMessage, dialogMessage);
if (!rv)
return;
@ -275,10 +275,9 @@ function (engineURL, iconURL, suggestedTitle, suggestedCategory)
dialogMessage += "\nSource: " + engineURL;
}
var cDlgService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
if (cDlgService)
cDlgService = cDlgService.QueryInterface(Components.interfaces.nsICommonDialogs);
var rv = cDlgService.Confirm(this.window, titleMessage, dialogMessage);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
var rv = promptService.Confirm(this.window, titleMessage, dialogMessage);
if (!rv)
return;