kcjoon / as3corelib

Automatically exported from code.google.com/p/as3corelib
0 stars 0 forks source link

After unwatch() is called in FileMonitor, eventListener is removed but is never re-added on watch(). #140

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. call watch()
2. call unwatch()
3. call watch()

What is the expected output? What do you see instead?
I expected the code to still monitor the file and throw the 
FileMonitorEvent.CHANGE event, however, the listener is removed, therefore 
the event is never called.

In the file, FileMonitor.as just remove:
timer.removeEventListener(TimerEvent.TIMER, onTimerEvent);
in the function unwatch(). Since you already called timer.stop() there is 
no reason to remove the listener.

Thanks,
James Hartig
@fastest963

Original issue reported on code.google.com by fastest...@gmail.com on 1 May 2010 at 7:49