← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #688897]: Why Handler is not working in region.onAppear.?

 

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

RaiMan proposed the following answer:
I principally understand.

But be aware:
not using observe is always a better choice (more complex, harder to debug, less obvious with relation to the workflow, ...), if the same can be achieved without it.

When trying to use more than one observe in parallel, you have to take
care for synchronization between the handlers, since with SikuliX at one
time only one handler should have access to screen, mouse and keyboard.
Otherwise you wold get some action chaos.

Definitions as you say (the expert term is functions), are a way, to
hide away complexity and to avoid repetitions of same or similar code
(DRY principle = don't repeat yourself).

So feel free to use functions whereever it makes sense - has nothing
todo with SikuliX nor observe.

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