Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to handle unsupported data type when calling java script function using SWT Browser(SWT Browser.Evaluate function)
How to handle unsupported data type when calling java script function using SWT Browser [message #834691] Mon, 02 April 2012 09:12 Go to next message
Mehul Shah is currently offline Mehul ShahFriend
Messages: 2
Registered: April 2012
Junior Member
HI All--
I am using Browser.evaluate to make a java script call that returns me a IDispatch pointer but it fails to convert it to the java type at WebSite.Java in convertToJava method and gives me an exception saying "Return value not valid". Is there any way to handle the return value.

Thanks in advanced.
Re: How to handle unsupported data type when calling java script function using SWT Browser [message #836483 is a reply to message #834691] Wed, 04 April 2012 14:35 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
Hi,

No, the values that can be passed between JS and Java are restricted to
those spec'd in the javadoc. If you want to refer to the IDispatch
later on then you can probably have your evaluation assign it somewhere
in the JS world (eg.- window.myDispatch) for reference by future
evaluates. However there's no notion provided of a scripting object
that lives on one side of the JS/Java boundary with a directly-invokable
interface on the other side.

Grant


On 4/2/2012 5:12 AM, Mehul Shah wrote:
> HI All--
> I am using Browser.evaluate to make a java script call that returns me a
> IDispatch pointer but it fails to convert it to the java type at
> WebSite.Java in convertToJava method and gives me an exception saying
> "Return value not valid". Is there any way to handle the return value.
>
> Thanks in advanced.
Re: How to handle unsupported data type when calling java script function using SWT Browser [message #837926 is a reply to message #836483] Fri, 06 April 2012 09:53 Go to previous message
Mehul Shah is currently offline Mehul ShahFriend
Messages: 2
Registered: April 2012
Junior Member
Hi Grant thanks for your reply.
Actually I am working on Visio activex control that is embedded in IE (html file). I am opening this file using SWT browser. On successful open I want to get instance of Visio ActiveX control.

Is there any way I can get this.

I was thinking of writing a BrowserFunction and setting the value from JS. But that is also not working. I am stuck.

Previous Topic:SWT Browser and IE Extensions
Next Topic:Table ScrollBar missing in GridLayout and Rowlayout
Goto Forum:
  


Current Time: Sun Dec 21 18:10:50 GMT 2014

Powered by FUDForum. Page generated in 0.01668 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software