On Mon, 26 Feb 2007 20:19:02 +0800, Hartmut Dippon
<ha************@hotmail.comwrote:
>
I did some debugging to see the order I get in my drag & drop event
compared to the order the files/dirs are selected. However I cannot see
any rule as when I select multiple files/dirs (not just 2, but e.g. 10)
I do not get the entries in the order of files/dirs in explorer and also
not in the order the files/dirs are selected. Mybe it's the order the
files/dirs are stored in
the file system.
My recollection is that Windows Explorer multi-file select goes something
like this:
1) Files are added to the file list LIFO. The most recently selected
file is first in the list.
2) When selecting more than one new file at a time (drag-rect,
shift-select a list, etc), the group is in order according to how they
appear in Windows Explorer, but the whole group is added at the front of
the selection
3) Clicking the final selection may result in one file (the file you
clicked to represent the whole group) being moved to the beginning of the
selection list
Of course, as Oliver notes there is no (as far as I know) documented
specification as to multi-select behavior for Windows Explorer. That is,
even if the above recollection is accurate, it should not be depended on.
It could change at any time.
So I think to let a user pick the order I always need to provide a list
of selected files/dirs where a user can rearange the files/dirs. This is
exactly what I wanted to avoid.
I'm not sure what it was you expected. Most applications that involve
themselves in lists of files generally do not depend on the files being in
any specific order. In those cases, they almost always simply display the
files in alphabetical order. In applications where order does matter,
since there is no way to guarantee that the user is necessarily going to
add the files in the right order in the first place, a UI to allow the
order of the files to be changed is always included. This is the
user-friendly thing to do.
If your application processes the filenames in some specific order, and
the order is important, I'm curious to know what your expectation of the
user specifying the order would have been? Was it your thought that the
user would be required to understand that the order in which they select
the files in Windows Explorer is important and results in an immutable
order in your own application? If so, I'd suggest that's not a very
user-friendly method of defining the order. If not, then it seems to me
that either you can reorder the files in your application (alphabetically,
for example, but any repeatable, predictable, documented method would be
fine), or you can allow the user to reorder the files manually, or both
(personally, if order matters, I'd recommend doing both).
Pete