Comment 0 for bug 1224795

Revision history for this message
vince (xuyatian) wrote : observe() doesn't wait for any event to occur and the next line runs immediately

-----------------------------------------------------
Environment: WIndows7 Sikuli 1.0.1 IDE

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

-----------------------------------------------------
script:

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

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

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