← Back to team overview

sikuli-driver team mailing list archive

[Bug 1224795] Re: [1.0.1] observe() doesn't wait for any event to occur and the next line runs immediately

 

** Summary changed:

- observe() doesn't wait for any event to occur and the next line runs immediately
+ [1.0.1] observe() doesn't wait for any event to occur and the next line runs immediately

** Summary changed:

- [1.0.1] observe() doesn't wait for any event to occur and the next line runs immediately
+ [1.0.1] observe() doesn't wait for any event to occur and the next line runs immediately --- workaround

** Description changed:

- -----------------------------------------------------
- Environment:
- Windows7
- Sikuli 1.0.1 IDE
+ -------- workaround 
+ use any numeric value to specify a waiting time (do not use FOREVER)
  
- -----------------------------------------------------
- when I run the script below, observe() does not wait for the appear event to occur,but the after line "print()" runs immediately.
+ e.g. observe(360*24*60*60) would wait for one year ;-)
+ --------------------------------------------------------------------------
  
- -----------------------------------------------------
+ when I run the script below, observe() does not wait for the appear
+ event to occur,but the after line "print()" runs immediately.
+ 
  script:
  
  def handler(event):
      print(event.type)
      stopObserver()
  
  def test():
      onAppear("recycle.png",handler)
      observe()
      print("end")
  
  -----------------------------------------------------
  test result:
  print "end"

** Summary changed:

- [1.0.1] observe() doesn't wait for any event to occur and the next line runs immediately --- workaround
+ [1.0.1] observe() or observe(FOREVER) doesn't wait for any event to occur and the next line runs immediately --- workaround

** 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/1224795

Title:
  [1.0.1] observe() or observe(FOREVER) doesn't wait for any event to
  occur and the next line runs immediately --- workaround

Status in Sikuli:
  Fix Committed

Bug description:
  -------- workaround 
  use any numeric value to specify a waiting time (do not use FOREVER)

  e.g. observe(360*24*60*60) would wait for one year ;-)
  --------------------------------------------------------------------------

  when I run the script below, observe() does not wait for the appear
  event to occur,but the after line "print()" runs immediately.

  script:

  def handler(event):
      print(event.type)
      stopObserver()

  def test():
      onAppear("recycle.png",handler)
      observe()
      print("end")

  -----------------------------------------------------
  test result:
  print "end"

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


References