MiletusFileWatcher questions

I am trying to use MiletusFileWatcher in a Webcore App.
The following code is being used to set up FileWatcher:

GetMiletusPath( NP_DOCUMENTS, _filePAF );
fw := FileWatcher.Files.Add;
fw.FileName := _filePAF + '\Test.txt';
fw.OnChange := FileWatcherFiles0Change;' 

I am puzzled on how filewatcher is suppose to work.
Here are a couple of questions:

  1. if the file "Test.txt" does not exist the app is throwing an exception:
    "Invalid argument to date encode".
    Where and how in the code should the exception be handled.

  2. If the file does exist and the app is running, and then I edit "Test.txt" from an outside program. The onChange event is not firing.
    Why is the onChange event not firing?

Thanks in advance.

--Rick Howitt

Hi,

  1. The TMiletusFileWatcher is for monitoring files that are already existing. However, the exception should not be raised so we applied an improvement. If a file does not exist it will still be "monitored". The OnChange event will trigger as soon as the file is created and after that whenever the file changes.
  2. An extra pair of backward slashes were added to the path and that prevented the event from triggering. We've applied a fix for this too.

Both changes will be available with the next update.