← Back to team overview

sikuli-driver team mailing list archive

[Bug 1405749] Re: [1.1.0] onVanish handler is not processed

 

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

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

Title:
  [1.1.0] onVanish handler is not processed

Status in Sikuli:
  Fix Released

Bug description:
  Version: 1.1.0 2014-12-23_01:00nightly
  Language: Python
  OS X 10.8

  Code:
  ###
  def myHandler(event):
      a = 1
      reg.setROI(10,10,10,10)

  reg = Region(0,0,1400,800)
  a = 0

  reg.onVanish("1419518759619.png", myHandler)
  reg.observe(background = False)
  reg.stopObserver()

  print a
  print reg.getX(), reg.getY(), reg.getW(), reg.getH()
  ###

  Question:

  Hey all! First, english isn't my native language, so sorry for my
  possible mistakes :(

  I'm trying to use onVanish() function, but it doesn't work. I wrote a
  little script to test it and my pattern that i used is a screenshoot
  file. First i open the screenshot, then i run the script with the IDE.
  It will be forever open if i don't do anything, but if i close the
  screenshot the script finishes, so i assume that onVanish() triggers
  correctly. But the result of the prints are:

  0
  0 0 1400 800

  Although it triggers, it doesn't seem to call my handler. If i use
  onAppear() in this example the handler function will work correctly
  and will be called. Is it a bug? Or what am i doing wrong?

  Thanks :)

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


References