On 6/14/06, Boris Zbarsky <[EMAIL PROTECTED] > wrote:

Sandesh Sethia wrote:
> Let me ellaborate on what I want to achieve - I simply want to accept a
URL
> from a user at the prompt and load the corresponding document into a
> browser myself.

OK.  So you have an nsIWebBrowser, right?

> For which I considered the design would be (and please correct me if I m
> wrong):
> 1. Invoke a method in nsIDocumentLoader with the URL to get back the
> content
> type and the
>    DocumentLoaderFactory that would handle that content type
> 2. Invoke the CreateInstance method on this Factory to get the Content
> Viewer and Stream Listener
> 3. And finally embed this Content Viewer in a ContentViewerContainer to
> load
> the document.

Er... if you really want to make yourself work hard, then maybe.  The
right way
to do what you want is to just get the nsIWebNavigation for your browser
and
tell it to load the URI.



So if I understand you correctly :
1. Ask Service Manager (by contractID) to give web browser component
2. QueryInterface web browser component for Web Browser and Web navigation
interface's
3. Invoke webbrowser interface method adWebBrowserListener  (not quite sure
abt this method !!)
4. Invoke webnavigation loadURI() method to load the page....

Am I right ????

Also, for this to work I should be getting the following part to work (which
i dont is not working):

#include <iostream>
#include "../include/nsXPCOM.h"
#include "../include/nsCOMPtr.h"
#include "../includensISupportsManager.h"

using namespace std;

int main() {
  nsresult rv;
  ncCOMPtr<nsIServiceManager> myServManager;

  return 0;
}

I get error:

/tmp/cclKCPBZ.o(.gnu.linkonce.t._ZN8nsCOMPtrI17nsIServiceManagerED1Ev+0xa):
In function `nsCOMPtr<nsIServiceManager>::~nsCOMPtr()':
: undefined reference to `nsCOMPtr_base::~nsCOMPtr_base()'
collect2: ld returned 1 exit status


I tried linking libxpcom.so every which way .....
1. thru export LD_LIBRARY_PATH
2. thru -L and -I options of gcc as well

but everything in vain.......I dont know where I am goin wrong..... any kind
of help wpuld be really appreciated as I m in a do or die situation right
.... :( thanks
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to