On Aug 21, 11:09 am, krithika <[EMAIL PROTECTED]> wrote:
> I have embedded gecko in a java application and I have loaded the
> document in designMode="on" . Iam trying to use the spell checker and
> I get exception below.What am I missing?
>
> org.mozilla.xpcom.XPCOMException: The function "InitSpellChecker"
> returned an error condition  (0x80040154)
>         at
> org.mozilla.xpcom.internal.XPCOMJavaProxy.callXPCOMMethod(Native
> Method)
>         at
> org.mozilla.xpcom.internal.XPCOMJavaProxy.invoke(XPCOMJavaProxy.java:
> 143)
>         at $Proxy27.initSpellChecker(Unknown Source)
>
> regards,
> Krithi
>
> ===================================
>
>               nsIDOMDocument doc=  win.getDocument();
>               nsIDOMDocument contentDoc = win.getDocument();
>               nsIDOMNSHTMLDocument nsDOMDoc =
> (nsIDOMNSHTMLDocument)contentDoc.queryInterface(nsIDOMNSHTMLDocument.NS_IDOMNSHTMLDOCUMENT_IID);
>               nsDOMDoc.setDesignMode("on");
>               nsIInterfaceRequestor ir = (nsIInterfaceRequestor)
> win.queryInterface(nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID);
>
>               nsIWebNavigation nav
> =(nsIWebNavigation)ir.getInterface(nsIWebNavigation.NS_IWEBNAVIGATION_IID);
>               nsIDocShell docShell
> =(nsIDocShell)nav.queryInterface(nsIDocShell.NS_IDOCSHELL_IID);
>               nsIInterfaceRequestor ir1 = (nsIInterfaceRequestor)
> docShell.queryInterface(nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID);
>               nsIEditingSession editSession
> =(nsIEditingSession)ir1.getInterface(nsIEditingSession.NS_IEDITINGSESSION_IID);
>
>               nsIEditor editor
> =(nsIEditor)editSession.getEditorForWindow(win);
>
>               nsIEditorSpellCheck spellCheck =
> (nsIEditorSpellCheck)factory.componentManager.createInstanceByContractID("@mozilla.org/
> editor/editorspellchecker;
> 1",null,nsIEditorSpellCheck.NS_IEDITORSPELLCHECK_IID);
>               System.out.println("spellCheck valueeeeeeeeeeeeeeeee
> "+spellCheck);
>               System.out.println("inLine spellCheck
> valueeeeeeeeeeeeeeeee "+editor.getInlineSpellChecker());
>               spellCheck.initSpellChecker(editor,false);
>
> =============================

I figured this out.I did not build with spellcheck option.

Thanks,
Krithi

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

Reply via email to