Linux File Chooser Correction
bobwarren at howsoft.com
Wed Mar 14 01:46:17 CDT 2007
A surprising number of you (to me at least) downloaded Demo Pack #2.01
of my File and Picture Chooser Widgets for Ubuntu. For that reason, I
must apologise for the necessity of another small correction.
Line 14 of the _file_chooser.ini (or _picture_chooser.ini) can now
contain a suggested file name for use in SaveAs functions, so unless the
operator chooses another file, the selected folder can be used with the
suggested file name to form the whole path. Previously, the OK button
was disabled until the operator chose a file name from the rightmost
column, since the widget only functioned for Load or Open operations.
Now, changing the selected folder on the left should no longer disable
the OK button, because the operator does not necessarily need to
actually select a file at all - he can use the suggested file name (or
type a new one).
A corrected version of the File Chooser is available at:
Just substitute it for the one found in the Demo Pack.
The Picture Chooser does not suffer this problem.
Very soon, the Demo Pack itself will be updated with this correction.
Another refinement I need to introduce soon is perhaps to make it
impossible for the widgets to carry forward filenames such as "*.*"
which are perfectly acceptable as suggested filenames in the INI file
and on widget display.
If this does happen with the current version, all you have to do is to
capture it with your calling program, and re-show the widget. Not
elegant, but it might do for now.
The next version of the widgets will allow you to show a pure folder
chooser if you wish, just by adjusting the values in the INI files**.
For this, the layout of the File Chooser would be changed. The rightmost
column (containing file names) would no longer be present: the operator
would simply navigate to his chosen folder in the tree in the leftmost
(now only) column, and click on OK. In the case of the Picture Chooser,
the layout would be exactly the same as it is now (allowing image
previews of the contents of the selected folders), but only the folder
path (and not any kind of filename) would be transmitted by the widget
out to the _picture_chooser_choice.txt .
**Perhaps something as simple as allowing the special word "folder" or
"*folder" in line 14 of the INI file (where the suggested file name is
Clear as mud?
Regards to all,
More information about the use-livecode