Thanks for your help darin +Medappa
"Darin Fisher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It sounds like you have made the best choice considering what you've > written here. In the future, hopefully, you will be able to develop > your application without needing to use interfaces and classes that are > private to the Mozilla implementation. For now, you are doing what > pretty much every other embedder is forced to do. We are working on > something better. Trust me ;-) > > -Darin > > > > C.N.Medappa wrote: > > >The latest String modification documentation states that embeders should use > >'nsEmbedString'. > >But due to the problem mentioned below i can't do it as of now. > > > >So i have decided to go with ns?AutoString, since most of the places where i > >uses nsEmbedString is for temporary purpose. > >Is there problem with this approach > > > >Thanks in advance > >+Medappa > > > > > > > >"C.N.Medappa" <[EMAIL PROTECTED]> wrote in message > >news:[EMAIL PROTECTED] > > > > > >>Thanks a lot Darin > >> > >>+Medappa > >> > >>"Darin Fisher" <[EMAIL PROTECTED]> wrote in message > >>news:[EMAIL PROTECTED] > >> > >> > >>>Just from a quick glance: > >>> > >>>nsString.h > >>>nsReadableUtils.h > >>> > >>>Those are going to cause trouble since they suck in nsAString.h > >>> > >>> > >directly. > > > > > >>>As a rule of thumb, if you just use headers included in the Gecko SDK, > >>>then you should avoid this problem. Of course, the Gecko SDK is > >>>generally not complete enough, which likely forces you to need to use > >>>headers from the Mozilla codebase. > >>> > >>>Looking over your list, it looks like you are including a lot of headers > >>>that would suck in nsAString.h. Perhaps you'd be better off not using > >>>nsEmbedString. In which case, perhaps you should just add a typedef > >>>somewhere in your code like this: > >>> > >>>typedef nsString nsEmbedString; > >>>typedef nsCString nsEmbedCString; > >>> > >>>Then just stop including nsEmbedString.h. > >>> > >>>-Darin > >>> > >>> > >>>C.N.Medappa wrote: > >>> > >>> > >>> > >>>>I am not including 'nsAString' specifically but may be included by some > >>>>other headers. > >>>>Below is the list of headers i am using, can you guess which may be > >>>> > >>>> > >>causing > >> > >> > >>>>problem? > >>>>Thanks for your help > >>>> > >>>> #include<iostream> > >>>> #include "nscore.h" > >>>> #include "nsCRT.h" > >>>> #include "nsCOMPtr.h" > >>>> #include "nsEmbedString.h" > >>>> #include "nsReadableUtils.h" > >>>> #include "nsXPCOMGlue.h" > >>>> #include "nsIBaseWindow.h" > >>>> #include "nsIWebBrowser.h" > >>>> #include "nsCWebBrowser.h" > >>>> #include "nsIWebNavigation.h" > >>>> #include "nsIWebBrowserPersist.h" > >>>> #include "nsIWebBrowserFocus.h" > >>>> #include "nsIWebBrowserSetup.h" > >>>> #include "nsIWebBrowserFind.h" > >>>> #include "nsISound.h" > >>>> #include "nsIDocShellTreeItem.h" > >>>> #include "nsIScrollable.h" > >>>> #include "nsITextScroll.h" > >>>> #include "nsIInterfaceRequestor.h" > >>>> #include "nsIInterfaceRequestorUtils.h" > >>>> #include "nsIWebBrowserChrome.h" > >>>> #include "nsIWebBrowserChromeFocus.h" > >>>> #include "nsIEmbeddingSiteWindow.h" > >>>> #include "nsIEmbeddingSiteWindow2.h" > >>>> #include "nsITooltipListener.h" > >>>> #include "nsIContextMenuListener2.h" > >>>> #include "nsWeakReference.h" > >>>> #include "nsIWebProgressListener.h" > >>>> #include "nsISHistoryListener.h" > >>>> #include "nsIObserver.h" > >>>> #include "nsIWindowCreator2.h" > >>>> #include "nsIDirectoryService.h" > >>>> #include "nsILocalFile.h" > >>>> #include "nsDirectoryServiceDefs.h" > >>>> #include "nsIXULWindow.h" > >>>> #include "nsIAppShellService.h" > >>>> #include "nsAppShellCIDs.h" > >>>> #include "nsWidgetsCID.h" > >>>> #include "nsIPref.h" > >>>> #include "nsVoidArray.h" > >>>> #include "nsIAppShell.h" > >>>> #include "nsIGenericFactory.h" > >>>> #include "nsIComponentRegistrar.h" > >>>> #include "nsIProfile.h" > >>>> #include "nsAppDirectoryServiceDefs.h" > >>>> #include "nsIWindowWatcher.h" > >>>> #include "nsEmbedAPI.h" > >>>> #include "nsIWidget.h" > >>>> #include "nsIJSContextStack.h" > >>>> #include "nsIEventQueueService.h" > >>>> #include "nsIEventQueue.h" > >>>> #include "plevent.h" > >>>> #include "nsIURI.h" > >>>> #include "nsIDOMWindow.h" > >>>> #include "nsIWebProgress.h" > >>>> #include "nsIRequest.h" > >>>> #include "nsIDOMEvent.h" > >>>> #include "nsIDOMKeyEvent.h" > >>>> #include "nsIDOMMouseEvent.h" > >>>> #include "nsIDOMNode.h" > >>>> #include "nsNetUtil.h" > >>>> #include "nsIIOService.h" > >>>> #include "nsNetCID.h" > >>>> #include "nsIInputStream.h" > >>>> #include "nsIDOMDocument.h" > >>>> #include "nsISHistory.h" > >>>> #include "nsIHistoryEntry.h" > >>>> #include "nsISupportsArray.h" > >>>> #include "nsIDOMWindowInternal.h" > >>>> #include "nsIWebBrowserPrint.h" > >>>> #include "nsIPrintSettings.h" > >>>> #include "nsIPrintingPromptService.h" > >>>> #include "nsIDOMKeyListener.h" > >>>> #include "nsIDOMMouseListener.h" > >>>> #include "nsIDOMMouseMotionListener.h" > >>>> #include "nsIURIContentListener.h" > >>>> #include "nsIDOMEventReceiver.h" > >>>> #include "nsPIDOMWindow.h" > >>>> #include "nsIChromeEventHandler.h" > >>>> #include "nsISelection.h" > >>>> #include "prmem.h" > >>>> #include "nsString.h" > >>>> #include "nsIClipboardCommands.h" > >>>> #include "nsICommandManager.h" > >>>> #include "nsICommandParams.h" > >>>> #include "nsIFocusController.h" > >>>> #include "nsDataHashtable.h" > >>>> #include "nsIDOMNamedNodeMap.h" > >>>> #include "nsIDOMNodeList.h" > >>>> #include "nsIPrivateDOMImplementation.h" > >>>> #include "nsIDOMDOMImplementation.h" > >>>> #include "nsIDOMDocumentType.h" > >>>> #include "nsIDOMDocument.h" > >>>> #include "nsIDOMAttr.h" > >>>> #include "nsIDOMElement.h" > >>>> #include "nsIDOMCharacterData.h" > >>>> #include "nsIDOMEntity.h" > >>>> #include "nsIDOMEntityReference.h" > >>>> #include "nsIDOMCDATASection.h" > >>>> #include "nsIDOMComment.h" > >>>> #include "nsIDOMDocumentFragment.h" > >>>> #include "nsIDOMProcessingInstruction.h" > >>>> #include "nsIDOMText.h" > >>>> #include "nsIDOMNotation.h" > >>>> #include "nsIDOMRange.h" > >>>> #include "nsIDOMDocumentRange.h" > >>>> #include "nsIDOMEventTarget.h" > >>>> #include "nsIDOMDocumentEvent.h" > >>>> #include "nsIDOMAbstractView.h" > >>>> #include "nsIDOMDocumentView.h" > >>>> #include "nsIDOMMutationEvent.h" > >>>> #include "nsIDOMUIEvent.h" > >>>> #include "nsIDOMNodeIterator.h" > >>>> #include "nsIDOMNodeFilter.h" > >>>> #include "nsIDOMDocumentTraversal.h" > >>>> #include "nsIDOMTreeWalker.h" > >>>> > >>>>Thanks > >>>>+Medappa > >>>> > >>>> > >>>>"Boris Zbarsky" <[EMAIL PROTECTED]> wrote in message > >>>>news:[EMAIL PROTECTED] > >>>> > >>>> > >>>> > >>>> > >>>>>C.N.Medappa wrote: > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>I get the following error of redefinition 'nsAString' and > >>>>>> > >>>>>> > >'nsACString' > > > > > >>>>>> > >>>>>> > >>>>>It sounds like you're including both nsEmbedString and nsAString > >>>>> > >>>>> > >>headers; > >> > >> > >>>>> > >>>>> > >>>>I > >>>> > >>>> > >>>> > >>>> > >>>>>think you only want the former. > >>>>> > >>>>>-Boris > >>>>> > >>>>> > >>>>> > >>>>> > >>>>_______________________________________________ > >>>>mozilla-embedding mailing list > >>>>[EMAIL PROTECTED] > >>>>http://mail.mozilla.org/listinfo/mozilla-embedding > >>>> > >>>> > >>>> > >>>> > >> > >> > > > > > >_______________________________________________ > >mozilla-embedding mailing list > >[EMAIL PROTECTED] > >http://mail.mozilla.org/listinfo/mozilla-embedding > > > > > _______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
