Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » FileSel&FileList, Path » File Chooser closing
Re: File Chooser closing [message #30536 is a reply to message #30510] Fri, 07 January 2011 11:20 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Neil,

The only problem I see in your code is that the work thread is started every time you call OpenFile(), while it should be called only when ExecuteOpen() returns true:
	void OpenFile(){
		fn0.ActiveDir(recent_dir);
		if(fn0.ExecuteOpen()){
			FileEF<<=fn0.Get();
			recent_dir=fn0.GetActiveDir();
    			work.Run(THISBACK(Work)); // <- moved here
		}
	    	//work.Run(THISBACK(Work));
	}
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...

If there is something else, than I'm seriously puzzled. It might be MSC related, in which case, I have no chance to figure it out.

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Warning in FileSel
Next Topic: FileSel has classic Windows look since r2848
Goto Forum:
  


Current Time: Sun Jun 08 08:08:36 CEST 2025

Total time taken to generate the page: 0.04444 seconds