Trouble getting access to an nsIDocShell instance [message #661720] |
Sat, 26 March 2011 17:01 |
Brian McGann Messages: 3 Registered: March 2011 |
Junior Member |
|
|
I am new to using SWT Browser support an am having trouble getting access to an nsIDocShell instance.
On Mac OSX 10.6, using SWT 3.6.2 with XULRunner 1.9.2.13:
...
int[] result = {0};
// get interface requestor
int rc = webBrowser.QueryInterface(nsIInterfaceRequestor.NS_IINTERFAC EREQUESTOR_IID, result);
if (rc != XPCOM.NS_OK){ throw new IllegalStateException("QueryInterface error=" + rc);}
if (result[0] == 0) {throw new IllegalStateException("Interface unavailable");}
nsIInterfaceRequestor interfaceRequestor = new nsIInterfaceRequestor(result[0]);
// get docShell
result[0] = 0;
int rc = interfaceRequestor.GetInterface(nsIDocShell.NS_IDOCSHELL_IID , result);
// always returns XPCOM.NS_NOINTERFACE
Examining source for "org.eclipse.swt.browser.Mozilla.create()" seems to indicate no interface for XULRunner post 1.8 is available. Is that true? If so, does that mean all docShell functionality is unavailable?
Any help would be greatly appreciated
Brian McGann
|
|
|
Powered by
FUDForum. Page generated in 0.03741 seconds