The mailing list has been closed since July 2022, but continues to serve as an archive of information about QF-Test.
If you want to stay informed about news about QF-Test, you can simply subscribe to our newsletter:
Subscribe to Newsletter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [QF-Test] Select multiple files in filechooser
Hello Gonzalo, yes, it is possible to select multiple files with this procedure, though it's neither documented nor obvious. In fact, I had to experiment a little to find out how to do it. In short, if a JFileChooser has multi selection enabled, it lists the selected files as a blank-separated list of quoted filenames in the file name field. As with single selection it is possible to simply set the text-field to the select file(s) and click OK, which is what the selectFile procedure does. So, if you call selectFile with the parameter file set to "/tmp/foo" "/tmp/bar" the result should be a selection of those two files. Getting the parameter into the selected format can be done with a bit of scripting. If you've got the files as a comma-separated list, for example, the following script should help files = rc.lookup("files").split(",") # Now files is the list of filenames once you've got those, the # following statement will create the required string files = " ".join(['"%s"' % f.strip() for f in files]) rc.callProcedure("qfs.swing.filechooser.selectFile", {"file": files}) I think we'll add a selectFiles procedure to our standard library. Best regards, Greg Gonzalo Parra <gonzalo.parra@?.com> writes: > Hello, > > I'm using the filechooser utility package included in the standard library and I have a question: > > Is it possible to select multiple files using this utility? How can I do it? > Is there any workaround to this? > > Thank you very much. > > Best Regards > > _______________________________________________ > qftest-list mailing list > qftest-list@?.de > http://www.qfs.de/mailman/listinfo/qftest-list -- Gregor Schmid Gregor.Schmid@?.de Quality First Software GmbH http://www.qfs.de Tulpenstr. 41 Tel: +49 8171 38648-0 DE-82538 Geretsried Fax: +49 8171 3864816 GF: Gregor Schmid, Karlheinz Kellerer HRB München 140833
|
1. Functional cookies
We use functional cookies to ensure the basic functionality of the website.
2. Performance and statistic cookies
We use Matomo for analyzing and optimizing our website. Cookies permit an anonymous collection of information that help us offering you a clear and user-friendly visit of our web pages.
This cookie contains a unique, pseudonymized visitor ID internal to Matomo for recognizing returning visitors.
This cookie is used to track from which website the anonymized user proceeded to our website.
The Matomo session cookie is used to track the visitor's page requests during the session.
is created and should be then directly deleted (used to check whether the visitor’s browser supports cookies).
short lived cookies used to temporarily store data for the visit.
short lived cookies used to temporarily store data for the visit.