tk_getOpenFile -multiple 1 -initialfile [glob *.jpg]
Lists all of the files in the 'filename' entry,
however, they are not selected. It would be nice to
have the visual confirmation that the files are indeed
the ones you want, and also "not breaking the metaphor"
or some such.
Logged In: YES
user_id=240
I am attaching a patch that does two things:
1) It makes it so that one doesn't lose the selection if the
mouse goes out of the window. This reflects what I see in
both listboxes, as well as other toolkits on Linux.
2) If you have an initialfile, that entry, or entries, are
selected.
Thanks!
Logged In: YES
user_id=240
There appears to be another problem. -initialfile selects
multiple files even if -multiple 1 isn't there.
Logged In: YES
user_id=72656
This patch fails the test suite when placed in the head. Needs
to be accompanied by new tests.
Logged In: YES
user_id=240
Only running test files that match: filebox.test
Tests began at Wed May 14 01:57:59 PM CEST 2003
filebox.test
Tests ended at Wed May 14 01:58:12 PM CEST 2003
all.tcl: Total 82 Passed 82 Skipped 0
Failed 0
Sourced 2 Test Files.
So.... what is failing where? This is with a recent (today)
Tcl and Tk. I will try and add some new tests after I
figure out how things work.
Logged In: YES
user_id=72656
There are multiple files with dialog tests, and one of them
choked on "data(selectFile)" not existing yet. This was on
the core-8-4-branch.
Logged In: YES
user_id=240
I went back and added some changes that should make things
behave the same with tk_strictMotif on.
Logged In: YES
user_id=240
Here are a few tests to check and see if things are working
properly. filebox.test now works without problems. If
there are other errors, would you be so kind as to point
them out? I get quite a few that seem completely unrelated
to this when attempting to run the whole Tk test suite.
Logged In: YES
user_id=72656
It is the choosedir.test files that are failing, as it appears
these commands are used there (the Update). Please make
sure to run the full test suite for patches. Here is the failure
that choosedir.test throws:
can't read "data(selectFile)": no such element in array
while executing
"lsearch $data(selectFile) [::tk::IconList_Get $data(icons) $i]"
(procedure "::tk::dialog::file::Update" line 96)
invoked from within
"::tk::dialog::file::Update .__tk_choosedir"
("after" script)
Logged In: YES
user_id=240
if { [info exists data(selectFile)] } {
for {set i 0} {$i < [::tk::IconList_Index $data(icons) end]}
{incr i} {
if { [lsearch $data(selectFile) [::tk::IconList_Get
$data(icons) $i]] != -1 } {
::tk::IconList_Selection $data(icons) set $i
}
}
}
Fixes the problem. I just wrap the code in an if. If you
want I can update the patch, but it's very simple.
I did attempt to run the whole test suite initially, but I
get a number of failures in things like the font code...
Logged In: YES
user_id=79902
-initialfile is defined as taking a single file as its
argument. It has to be that way because there may be
filenames with spaces in floating about (they are
disappointingly common on non-Unix systems, and we
absolutely want to keep the same API.) Alterations to this
will require a TIP, and hence can't be done for 8.4 at all.
Logged In: YES
user_id=79902
See TIP#141
Logged In: YES
user_id=79902
Assigning to someone who has a working testbed... :^/
Still required (IMHO):
Update so that multiple files work on Windows
Update so that multiple files work on Macs
Update to documentation
More careful review of tests
(Also deleted old patch, confusingly named "latest.diff")
Logged In: YES
user_id=240
Here is a documentation patch.
Logged In: YES
user_id=240
I have added another patch which corrects something that kbk
pointed out. Arguments to -initialfile should all be in
the directory displayed.
Implements multiple initialfile selection on Mac OS X
Logged In: YES
user_id=240
Adding a test for malformed -initialfile lists combined with
-multiple.