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

Bug #1224795 reported by vince on 2013-09-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Critical
RaiMan

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"

vince (xuyatian) on 2013-09-13
description: updated
description: updated
description: updated
RaiMan (raimund-hocke) on 2013-09-13
summary: - 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: [1.0.1] observe() doesn't wait for any event to occur and the next line
- runs immediately
+ runs immediately --- workaround
RaiMan (raimund-hocke) on 2013-09-13
description: updated
summary: - [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
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
RaiMan (raimund-hocke) on 2015-09-17
Changed in sikuli:
importance: High → Critical
summary: [1.0.1] observe() or observe(FOREVER) doesn't wait for any event to
- occur and the next line runs immediately --- workaround
+ occur and the next line runs immediately --- fixed in 1.1.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers