Reputation: 1513
I have an interesting dilemma.
If I define my class as:
class Browser {
def swtException
protected Object evaluate(script) throws SWTException {
swtException=null
display.syncExec() {
try {
result=swtBrowser.evaluate(script)
} catch (SWTException swtException) {
Browser.swtException=swtException
}
}
}
I get this rather interesting error:
Exception in thread "Thread-5" org.eclipse.swt.SWTException: Failed to execute runnable (groovy.lang.MissingPropertyException: No such property: swtException for class : com.mksoft.fbautomate.browser.Browser Possible solutions: swtException)
Any ideas???
Thank you! Misha
Upvotes: 0
Views: 91
Reputation: 133569
Maybe because you are trying to access a attribute of a class in a static way? you seem to refer to Browser.swtException
but Browser
is a class, not an object instance.
You should declare swtException
as static
or use this.browser
to access the one of your current object.
Upvotes: 1