Hi,
Thanx Niky and Scott. Niky, I did ensure the components directory is in
the path, so nsnull in NS_InitEmbedding is fine.
I had been able to resolve my problem, though. I wonder why the gecko
SDK does not have any test program with Makefile. I debugged through my
program and also the TestGtkEmbed and tried to find out the difference.
Then I tried replacing TestGtkEmbed.cpp with my program and used
mozilla Makefile. It worked. From this I can easily separate out the
cause.
So I move an step ahead. I can now intantiate the nsIWebbrowser,
nsIWebNavigation and nsISHistory. All succeed.
I now try to do a LoadURI, it fails. Clearly there is something else I
need to do, what is that I have to figure out. my code is
nsresult rv = mNavigation->LoadURI((const PRUnichar*)"<html> <head>
<title>Small Htmll</title> </head> <body> Hello </body> </html> ",
nsIWebNavigation::LOAD_FLAGS_NONE,
nsnull,
nsnull,
nsnull);
printf("LoadURI rv = %08X\n", rv);
The error is "WARNING: NS_ENSURE_TRUE(mDocShell) failed, file
nsWebBrowser.cpp, line 671"
If somebody has a clue, please help me. Once I resolve this I will post
it for other's benefit.
What am I trying to do?
I am looking at Mozilla/Gecko for various purposes. To begin with, my
current goal is,
Write a main program which reads an html file from disk passes it to
gecko and from gecko receives the DOM and writes it to stdout. This
achieves an HTML parsing for me in a server scenario as I cant have any
UI. if somebody has ideas/pointer to info that can help, please tell
me. If you need my code, let me know I will post it.
regards
Swapnil
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding