Comment 1 for bug 1212706

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [1.0.1] observe with onChange() does not work

... and yes, I have changed a lot with observe:
From the ChangeLog of 1.0.1

--- observe is reworked and options are added
- it is more verbose with higher debug levels

- it still stops observing after the first match (even in background with FOREVER) (not for onChange())

- if you want to run it continually, use (except onChange())
event.repeat(seconds)
which will continue the observe after having waited the given seconds (e.g. to give time to the GUI for changes)

For all events: it is internally counted, how often the handler was visited, so it is now possible to decide in the handler wether to stop the observe after some time using e.g.
if event.getCount() > 10: event.stopObserver()
So there is no longer the need to stop the observation in the main script after some time.

... and yes: event.stopObserver() is now sufficient (instead of event.region.stopObserver() )
You still have to take care, to stop background observations at the end of the script (to be fixed with 1.1)