On Mar 8, 2006, at 11:52 AM, Ben Hutchings wrote:

Please can you post (or point to) the code you use for installing
the prompt service.


Sorry, I just realized I forgot to remove yahoo's assertion that list emails are spam.  See below for code (in 1.75):


// Use our own prompts instead of the Mozilla default ones
// If this fails, we can continue
nsCOMPtr<nsIComponentRegistrar> compReg;
NS_GetComponentRegistrar(getter_AddRefs(compReg));
if (!compReg)
DWarn("Unable to Get Component Registrar");
else {
nsCOMPtr<nsIFactory> promptFactory;
rv = NewPromptServiceFactory(getter_AddRefs(promptFactory));


if (NS_FAILED(rv)) 
DWarn("Unable to create Prompt Service Factory");
else {
rv = compReg->RegisterFactory(kPromptServiceCID,
"Prompt Service",
NS_PROMPTSERVICE_CONTRACTID,
promptFactory);
if (NS_FAILED(rv))
DWarn("Unable to register new Prompt Factory");
}
}

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to