filesystemwatcher addlistener handles in base workspace

1 view (last 30 days)
I have a filesystemwatcher that is watching a log file using addlistener. The log file contains the location of other files that will need to be monitored using addlistener. To get the secondary filesystemwatcher's to work correctly with addlistener I had to use assignin to save the listener handle to the base workspace with each secondary listener handle having a different variable name. This appears to work but I am surprised that it is necessary to have all of the handles exist in the workspace. What am I not understanding? I am using R2014b.

Answers (0)

Categories

Find more on Prepare Model Inputs and Outputs in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!