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 » Filesel to admit folder names
Filesel to admit folder names [message #35607] Mon, 05 March 2012 10:49 Go to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello all

Now AFAIK FileSel File field only admits file names when looking for files.

A good thing could be if that field would admit folder names, so that the Directory field would change to that folder.

What do you think?

index.php?t=getfile&id=3665&private=0
  • Attachment: filesel.PNG
    (Size: 25.21KB, Downloaded 698 times)


Best regards
Iñaki
Re: Filesel to admit folder names [message #35614 is a reply to message #35607] Tue, 06 March 2012 09:55 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 302
Registered: October 2008
Location: France
Senior Member
Hi Koldo, Smile

Agree with you, it should be more convenient for the user.

Regards

Biobytes.
Re: Filesel to admit folder names [message #35641 is a reply to message #35607] Fri, 09 March 2012 12:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13442
Registered: November 2005
Ultimate Member
koldo wrote on Mon, 05 March 2012 04:49

Hello all

Now AFAIK FileSel File field only admits file names when looking for files.

A good thing could be if that field would admit folder names, so that the Directory field would change to that folder.

What do you think?

index.php?t=getfile&id=3665&private=0


I am confused. First of all, screenshot is not verz familiar - this looks like something 7 years ago. Is not this post somehow resurected from the past?

Moreover, what you request, if I understand you well, seems to work for me. If I write theide in this situation and press enter, it goes to theide directory...

Mirek
Re: Filesel to admit folder names [message #35642 is a reply to message #35641] Fri, 09 March 2012 12:48 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Sorry Mirek Embarassed

It does work. I am confused because I am sure I tried it before. Perhaps it happened in an old .exe I run.


Best regards
Iñaki
Re: Filesel to admit folder names [message #36081 is a reply to message #35642] Wed, 25 April 2012 16:26 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello Mirek

I have found the problem again and the reason of the strange behavior. In FileSel::Open(), line 829 there is a:
if(fn.Find(' ') < 0 && fn.Find('\"') < 0) {
...
	if(ff[0].is_directory) {
		SetDir(TrimDot(fn));
...
}
This means that if the directory has not spaces (like in "c:\data"), it is considered as directory. However if it has spaces (like in "C:\Documents and Settings", it is considered only as file name.


Best regards
Iñaki
Re: Filesel to admit folder names [message #36082 is a reply to message #36081] Wed, 25 April 2012 22:55 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13442
Registered: November 2005
Ultimate Member
koldo wrote on Wed, 25 April 2012 10:26

Hello Mirek

I have found the problem again and the reason of the strange behavior. In FileSel::Open(), line 829 there is a:
if(fn.Find(' ') < 0 && fn.Find('\"') < 0) {
...
	if(ff[0].is_directory) {
		SetDir(TrimDot(fn));
...
}
This means that if the directory has not spaces (like in "c:\data"), it is considered as directory. However if it has spaces (like in "C:\Documents and Settings", it is considered only as file name.



OK, I guess that the test for space is not really needed (I guess I was too prudent at the time of writing it), removing seems to fix the problem (comited to svn).

Mirek
Re: Filesel to admit folder names [message #36085 is a reply to message #36082] Thu, 26 April 2012 08:45 Go to previous message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Thank you Mirek. Now it is better Smile .

Best regards
Iñaki
Previous Topic: Little fix for FileSel::AddPlace
Next Topic: Display FileName without full path
Goto Forum:
  


Current Time: Wed Oct 20 08:20:55 CEST 2021

Total time taken to generate the page: 0.01066 seconds