Jian,
I am getting the following error when calling* CheckBox* methods*
check*,*uncheck
* or* isChecked*, from a custom Widget:
groovy.lang.*MissingMethodException*: No signature of method:
org.tellurium.widget.Widget$_check_closure6.call() is applicable for
argument types: (org.tellurium.locator.CompositeLocator, null) values:
{org.tellurium.locator.compositeloca...@61cd2, null}
at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:241)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:672)
at
groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:784)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeClosure(ScriptBytecodeAdapter.java:605)
* at org.tellurium.object.CheckBox.check(CheckBox.groovy:17)*
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:778)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodNSafe(ScriptBytecodeAdapter.java:178)
* at org.tellurium.widget.Widget.check(Widget.groovy:108)*
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
The only other way to circumvent this error, was to change the way Closure c
is invoked, as follows:
def check(Closure c){
// c(locator, respondToEvents)
c(locator)
}
def boolean isChecked(Closure c){
// c(locator, respondToEvents)
c(locator)
}
def uncheck(Closure c){
// c(locator, respondToEvents)
c(locator)
}
Is this the right way to deal with this problem or am I missing something?
Thanks
Iustina
P.S. I had a similar error in* Image* for* click*,* doubleClick* methods
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---