← Back to team overview

sikuli-driver team mailing list archive

[Bug 1476773] [NEW] [1.1.0] observe: setInactive/setActive not working

 

Public bug reported:

Hi again.

Im writting a code that will check if an image appeared on a Region.
After the image appears the program will scan the same region to see if
it desappears.  When the image desappears it will start to scan to see
if it appears again, and so on.

So, im using OnAppear and OnVanish on the same region with a single
handler. (calling Repeat() in the end)

The problem with this solution is that the handler will continue to be
called with type = APPEAR even if the handler was already triggered one
time with APPEAR.  The same happen when the image disappears and the
handler is called with type = VANISH. It will continue to be called with
VANISH until the image appears again.

Is there a way to avoid this? Is it possible to unregister OnAppear/OnVanish and register it again in a Region?
Do i have to use two different regions with the same dimmensions?

Thanks

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: Fix Committed

** Changed in: sikuli
       Status: New => Fix Committed

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.0

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1476773

Title:
  [1.1.0] observe: setInactive/setActive not working

Status in Sikuli:
  Fix Committed

Bug description:
  Hi again.

  Im writting a code that will check if an image appeared on a Region.
  After the image appears the program will scan the same region to see
  if it desappears.  When the image desappears it will start to scan to
  see if it appears again, and so on.

  So, im using OnAppear and OnVanish on the same region with a single
  handler. (calling Repeat() in the end)

  The problem with this solution is that the handler will continue to be
  called with type = APPEAR even if the handler was already triggered
  one time with APPEAR.  The same happen when the image disappears and
  the handler is called with type = VANISH. It will continue to be
  called with VANISH until the image appears again.

  Is there a way to avoid this? Is it possible to unregister OnAppear/OnVanish and register it again in a Region?
  Do i have to use two different regions with the same dimmensions?

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1476773/+subscriptions


Follow ups