D
Dilip
I think I have missed reading something fundamental in Winforms
programming. Could someone please point me my folly? I know I can do
this differently but I would still like to know what I am missing
here.
As a part of a larger application, I have a Winforms app that uses
FileSystemWatcher class to watch for files created in a particular
directory. When the OnCreated event is raised I store the full path
of the created file in a static member (an ArrayList to be precise) of
another class (that is in the same namespace of course). Everything
works fine till here.
Now I have a button on that form that pops up another modal dialog.
While this modal dialog is still on, lets say I create a file in the
watched directory which in turns raises the event. As a part of
handling this event when I look up the static member (to add the newly
created file path) I find that all the previously added files are
zeroed out and the count is zero! Basically the ArrayList I mentioned
above has a count of zero!
What is it about Winforms I haven't understood here?
thanks
--Dilip
programming. Could someone please point me my folly? I know I can do
this differently but I would still like to know what I am missing
here.
As a part of a larger application, I have a Winforms app that uses
FileSystemWatcher class to watch for files created in a particular
directory. When the OnCreated event is raised I store the full path
of the created file in a static member (an ArrayList to be precise) of
another class (that is in the same namespace of course). Everything
works fine till here.
Now I have a button on that form that pops up another modal dialog.
While this modal dialog is still on, lets say I create a file in the
watched directory which in turns raises the event. As a part of
handling this event when I look up the static member (to add the newly
created file path) I find that all the previously added files are
zeroed out and the count is zero! Basically the ArrayList I mentioned
above has a count of zero!
What is it about Winforms I haven't understood here?
thanks
--Dilip