Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » BrowserFunction does not work in exported product
BrowserFunction does not work in exported product [message #636774] Tue, 02 November 2010 17:49 Go to next message
Matt Sither is currently offline Matt SitherFriend
Messages: 33
Registered: July 2009
Member
I have an RCP app that runs an SWT Browser, which points to an embedded Jetty web server. JavaScript code in the page makes callbacks to my Java client code via an SWT BrowserFunction. This works perfectly when running the app directly from my development environment, but when I export the product and run that, then my BrowserFunctions don't get called. To prove they don't get called, I implemented a BrowserFunction called "theJavaFunction", and I also implemented a JavaScript function with the same name in the webpage. The JavaScript function simply fires an alert telling the user the function was called. When I run the exported product, the JavaScript function runs, rather than the BrowserFunction.

Oddly enough, I've tried this with a few different versions of Eclipse, and one of them produced an exported product that actually worked. Does this make any sense at all to anyone? It doesn't to me. Please help!

Thanks!
Re: BrowserFunction does not work in exported product [message #636951 is a reply to message #636774] Wed, 03 November 2010 14:04 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

Is your Browser Mozilla-based (ie.- you're either running on *ix, or are
creating the Browser with style SWT.MOZILLA)? Assuming it is, this
functionality relies on the Browser being able to write swt's contained
external.xpt file to a place where it can be read later by mozilla. The
location where this file needs to be written to varies between some swt
versions and platforms, so I can't suggest a specific directory to check
without knowing your OS and swt version. To investigate this on your end,
you can debug your app in eclipse after putting a breakpoint in SWT's
Mozilla class where you find string "external.xpt". You'll see the
directory that the file is to be written to, and then you can verify whether
it's there or not, and if not then hopefully you can determine the cause
(eg.- permissions problems?).

If my assumption about your Browser being Mozilla is wrong, or if you have
further questions, then please follow up.

HTH,
Grant


"Matt Sither" <sither@mit.edu> wrote in message
news:iapioo$rom$1@news.eclipse.org...
>I have an RCP app that runs an SWT Browser, which points to an embedded
>Jetty web server. JavaScript code in the page makes callbacks to my Java
>client code via an SWT BrowserFunction. This works perfectly when running
>the app directly from my development environment, but when I export the
>product and run that, then my BrowserFunctions don't get called. To prove
>they don't get called, I implemented a BrowserFunction called
>"theJavaFunction", and I also implemented a JavaScript function with the
>same name in the webpage. The JavaScript function simply fires an alert
>telling the user the function was called. When I run the exported product,
>the JavaScript function runs, rather than the BrowserFunction.
>
> Oddly enough, I've tried this with a few different versions of Eclipse,
> and one of them produced an exported product that actually worked. Does
> this make any sense at all to anyone? It doesn't to me. Please help!
>
> Thanks!
Previous Topic:disposing images created by a label provider
Next Topic:Eclipse editor latin2 characters
Goto Forum:
  


Current Time: Sat Apr 27 01:47:16 GMT 2024

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

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

Back to the top