Home » U++ Library support » FileSel&FileList, Path » File Chooser closing
Re: File Chooser closing [message #30537 is a reply to message #30536] |
Fri, 07 January 2011 12:31  |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
Hi Honza
That was the problem.
dolik.rce wrote on Fri, 07 January 2011 11:20 | That might "look like" the file is opened even when you cancel the selection, because the replay happens unconditionally every time. Is that the problem you have? But that would not be problem in the other application you provided as example...
|
"...because the replay happens unconditionally every time."
I was calling the work thread outside of the:
if(fn0.ExecuteOpen()){
...
}
The previous example did not use a thread. Even with 8 hours of data it only took a few seconds to merge.
There is a separate call to merge by clicking File->Merge so it was not automatic.
bar.Add("Merge Files", THISBACK(Merge));
If the file chooser was closed with "Cancel" without picking a file the variables for the out, base and roam files were still set even if the data in the EditField was deleted.
When the app was started the .cfg file set the (recent_dir) to when the app was previously run, opening the file chooser and closing with "Cancel" set whatever file was to be picked to that of the previous run, (recent_dir), and that was only when a file was not picked. Normally this would not be much of a problem but testing found this error.
I am used to something like if(fn0) and if(!fn0)
The if(fn0.ExecuteOpen()) added to my confusion.
Calling the work thread from inside the if() block fixed things.
I have two other apps with the same fix.
Much Thanks!
Neil
[Updated on: Fri, 07 January 2011 12:48] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Jun 07 17:56:04 CEST 2025
Total time taken to generate the page: 0.13660 seconds
|