← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

 

Question #272154 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/272154

RaiMan posted a new comment:
yes, rather academic and from my point of view not really applicable to
this case.

If interrupting should make sense, then you should be busy with
something, that gets interrupted by some event and at that time you
decide to do something else based on the type of interruption and then
continue, what you have done before.

The observeInBackground together with the handler principally is something like that:
- your main worflow runs
- the observe runs in parallel
- the event happens and the callback is processed (see comment)
- the observe might be continued
- ... while your workflow is still running 

comment:
from my point of view, the handler is the point of interruption (you might implement something here, that interrupts your main workflow (... but for what?). 

If in this case their would have been a compound feature like
wheelDownUntilAppear("someImage")

which simply would do what it says, you would not have noticed the polling.
What else would you have wanted to do in this workflow besides waiting for the image to get visible?

... yes, rather academical ;-)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.