Overriding PromptService in newer XULRunner

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Overriding PromptService in newer XULRunner

FrAnk Alvin
Hi,
In my embedding c++ application, We override the default PromptService
to provide custom dialogs for alert, prompt, etc by

---------------------------------------------------------------------------------------------
        nsCOMPtr<nsIFactory> promptFactory;
        rv = NS_NewPromptServiceFactory(getter_AddRefs(promptFactory));
        if (NS_SUCCEEDED(rv)) {

                nsCOMPtr<nsIComponentRegistrar> compReg;
                rv = NS_GetComponentRegistrar(getter_AddRefs(compReg));
                NS_FAILED(rv, rv);

                rv = compReg->RegisterFactory(kPromptServiceCID,
                        "MMPrompt Service",
                        "@mozilla.org/embedcomp/prompt-service;1",
                        //"@mozilla.org/prompter;1",
                        promptFactory);

                NS_FAILED(rv, rv);
        }
---------------------------------------------------------------------------------------------
When using XULRunner 1.9.* versions, this works perfectly
But, this doesn't work on newer XULRunner versions (>= 4.0)

I have googled on this, but I couldn't fix it

Any help/suggestions?

Thanks,
Alvin
_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding