Please don't use binary XPCOM. Support for binary XPCOM is being removed.
And also it's very unlikely that a modal prompt is a good UI solution from
within the network stack.

--BDS

On Thu, Oct 27, 2016 at 4:19 AM, Tobias Wolf <wolf.tob...@gmx.net> wrote:

> Hi folks,
>
> I`ve developed a nss module for firefox in c/c++. In case of an error in
> my module I want to show a simple error dialog.
>
> This is want I do, the code was tested and working:
>
> ```
> void ac_firefox_show_alert_dlg(const char* title, const char* text) {
>         const NS_ConvertASCIItoUTF16 wTitle(title);
>         const NS_ConvertASCIItoUTF16 wText(text);
>
>         nsCOMPtr<nsIPromptService> promptService = (do_GetService("@
> mozilla.org/embedcomp/prompt-service;1"));
>
>         if (promptService != NULL) {
>                 promptService->Alert(NULL, wTitle.get(), wText.get());
>         }
> }
> ```
>
> No I found out that the dialog wasn`t working in latest firefox 46.0.2
> version. The call to ```do_GetService("@mozilla.
> org/embedcomp/prompt-service;1")``` returns NULL.
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to