--- In [email protected], "forxtra" <forx...@...> wrote:
> BTW, how did the issue related to using a unicode.file_watchfolder() go? > > http://tech.groups.yahoo.com/group/power-pro/message/35040 Oops, missed that. > Is this the indented behavior? You asked: ; ------------------------------------------- local uFolder = unicode.new(?#C:\#) unicode.file_watchfolder(uFolder, "Win.Debug(,)") messagebox("Ok Topmost", ?"Add, change or delete a file at root level in C:\", "unicode.file_watchfolder test") ; ------------------------------------------- > If I close the messagebox before adding or deleting a file in c:\, > both arg(1)and arg(2) are identical. Is this indented behavior? I think so, because uFolder is local. It goes out of scope as soon as above block of code exits. The handle contained in it is in invalidated. It then gets reused to point to a unicode file name, so you get an old invalid handle, and same handle pointing to filename. Solution is to use a static to hold handle in uFolder. Clear? I'll add comment to docs. I also notice I've implemented file_endwatchfolder(han), but forgot to document it.
