sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #30332
[Bug 1413399] Re: onAppear() performs function but gives error and halts script. does not happen in 1.0.1
Sorry Raiman I dont understand. When I read the Python documentation it
stated that if I wanted to use the onAppear() function that it accepted
one parameter so I thought "oh how neat i can use this onAppear to say
when this item appears perform this function.
but you are saying that is not how it was designed and not its intended
function?
You are saying in 1.0.1 that onAppear(img, paste('text')) was NOT
support to work but a defect allowed it to work with out displaying an
error in the IDE and that in 1.1.0 that defect is fixed now which is why
i get an error in the IDE now?
What are the cons to allowing the onAppear() function to call another
function?
I dont understand how the observe() is supposed to work and what lambada
is etc so now i'm more confused unfortunately. I apologize.
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1413399
Title:
onAppear() performs function but gives error and halts script. does
not happen in 1.0.1
Status in Sikuli:
Invalid
Bug description:
Version using 1.1.0
Windows 7 64 bit
use onAppear command
I use onAppear quite often to read dialog boxes and perform commands.
one example is:
onAppear("1421877826215.png", paste('List Item'))
in 1.0.1 it performs this fine and continues script.
in 1.1.0 it performs this but then stops, supplies an error and the
script halts.
i am calling this function from another script so the error just says
error in line XXX where im calling it so I end up having to go find
the parent script and run it individually to get the actual error
which asys:
[error] script [ TestScratchpad2 ] stopped with error in line 1
[error] java.lang.ClassCastException ( java.lang.ClassCastException: java.lang.Integer cannot be cast to org.sikuli.script.ObserverCallBack )
you can use any parameter with onAppear and it will run with the
parameter but always gives an error. the error changes depending on
which parameter you call.
if you call it like this:
onAppear("1421877826215.png", popup('List Item')
then you get this error:
[error] script [ TestScratchpad2 ] stopped with error in line 1
[error] java.lang.NullPointerException ( java.lang.NullPointerException )
for now I am falling back to 1.0.1 since i use this in so many areas I can not change them all to wait() functions to work around it.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1413399/+subscriptions
References