I am writing a program to assemble a specialized file to control another program. This file is comprised of a number of different file names. To make selecting one of the files easier I want to specify the actual last 6 characters in the file and the extension which is based on another file choice. That way the user only has to click the file to get it, no browsing required. As an example, in the code segment below the String EPFMask might be *121408.epf. This code does what I want once, but on subsequent executions with a diferent EPFMask, say *121600.epf it it ignores updates to EPFMask. It seems to only apply the first applied mask. I have verified that EPFMask is updating in the debugger.
A friend of mine showed me a solution to my problem.
I had made a global instance of fsEPF. Recurrent setting of FileSel.Type only adds to *names and *ext. By making fsEPF a local variable to the start of the code segment a new "cleard" fsEPF with empty *names and *.ext is created each time.