|
Re: Browser won't show in RAP 1.4.2 [message #948105 is a reply to message #947362] |
Wed, 17 October 2012 19:10 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
Erwin,
you might be running into layout issues. If you create a new widget, you
are responsible to re-layout the parent in order to show the new widget.
What is the try-catch block for? Don't you rather want to see exceptions
that occur while calling setUrl() or setText()?
Did you try to replace the browser widget with a Label, just to be sure
that the problem isn't specific to the Browser widget.
The call to setUrl() is overriddent by setText() and thus could be
omitted. Is this what you want?
HTH
Rüdiger
On 17.10.2012 14:50, Erwin Hogeweg wrote:
> I am trying to open an embedded browser in a RAP application, but I must
> be doing something wrong because it doesn't show up.
>
> As far as I can see this is just standard code:
>
> link.addSelectionListener(new SelectionAdapter() {
> @Override
> public void widgetSelected(SelectionEvent event) {
> try {
> // Browser b = new Browser(parent, SWT.NONE);
> Browser b = new Browser(parent.getShell(), SWT.NONE);
> // b.setUrl("http://www.eclipse.org");
> b.setText("<html><body>This is Unicode HTML
> content from memory</body></html>"); } catch
> (SWTError e) {
> // Error handling here
> }
>
> }
> });
>
>
> I can see the request go out, but the page is never shown.
>
> If I replace it with the ExternalBrowser it works... but not as desired.
>
> Any insight is highly appreciated.
>
> Using Eclipse RAP 1.4.2 on Mac OS X.
>
> Kind Regards,
>
> Dutch.
--
Rüdiger Herrmann
http://codeaffine.com
|
|
|
|
Powered by
FUDForum. Page generated in 0.03592 seconds