Home » U++ Library support » LineEdit, EditFields, DocEdit » About the beahaviour of FileSel fs.Type
|
|
Re: About the beahaviour of FileSel fs.Type [message #3809 is a reply to message #3807] |
Tue, 27 June 2006 22:12 |
|
forlano
Messages: 1189 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
luzr wrote on Tue, 27 June 2006 21:49 |
forlano wrote on Tue, 27 June 2006 09:55 | Hello,
I have the following piece of code
FileSel fs; // for Linux and windows
String fn;
fs.Type( t_("archive FIDE (txt)"), "*.txt") //type 1
.Type( t_("archive VEG (csv)"), "*.csv;*.veg") //type 2
.Type( t_("national archive with Fixed Length (txt)"), "*.txt") //type 3
.Type( t_("archive FSI Italy (csv)"), "*.csv") //type 4
.DefaultExt("txt");
As you can see type 1 and type 3 are both "*.txt" but are processed differently by the program. The problem is that if I select in the drop list type 3, at the end is shown always type 1. I wonder if this is normal and related to the fact that there are two type with the same extension. In fact if I set the extension "*.pxp" for type 3 I can select it.
Luigi
|
Yes, very likely. Something to change?
Mirek
|
In my case the possibility to select always the wanted type is fundamental to process properly the file. In fact I recognise the file not for the extension but for the index it has in the type drop list. I this way I can understand easily wich kind of txt the user ha selected. As workaround I set now:
...
.Type( t_("national archive with Fixed Length (txt)"), "*.txt;*.csv") //type 3
...
that removed the ambiguity between type 1 and 3 being both txt.
Anyway I think should be better in future to let choose the user what file type he wants. Maybe there are many txt files each of them need to be processed in different way. By getting the index of the type selected everything it is easy. Now this case can be handled with some difficulty.
Luigi
|
|
|
|
Goto Forum:
Current Time: Thu Jun 13 05:41:11 CEST 2024
Total time taken to generate the page: 0.01571 seconds
|