Project

General

Profile

Defect #250

getting html property of ServoyBrowser bean

Added by Troy Elliott almost 11 years ago. Updated almost 11 years ago.

Status:
Rejected
Priority:
Normal
Target version:
-
Start date:
03/18/2011
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

When in the debugger it is not possible to call the html property of the ServoyBrowser bean from the Interactive Console.

This is the exception thrown:
elements.servoy_browser.html
"Error during evaluation:Wrapped java.lang.IllegalStateException: This call must happen in the AWT Event Dispatch Thread! Please refer to http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html and http://java.sun.com/javase/6/docs/api/javax/swing/SwingUtilities.html#invokeLater(java.lang.Runnable)"

History

#1

Updated by Troy Elliott almost 11 years ago

Oh yeah, Mac OS X 10.6.6, Servoy 5.2.6, latest BrowserSuite.

#2

Updated by Patrick Talbot almost 11 years ago

  • Status changed from New to Rejected

Nothing I can do about it: as the Exception says, the call must happen in the AWT thread (which is the case when you call it regularly but not true if you call it from the debugger), but I cannot wrap the call using SwingUtilities.invokeLater(Runnable) because this call doesn't return immediately, this is the type of call that needs a callback and synchronizing.
And SwingUtilities.invokeAndWait is not secure (it might deadlock).

So I guess that if you need to find out what's in that call (which is not really a property but a call to the js_getHtml() method), you are best to set a variable to the content then debug that variable after it has been set.

So:
var html = elements.servoy_browser.html;
application.output(html); // <-- you can set a breakpoint here, and debug the variable html

Also available in: Atom PDF