WINAPI Multiple File Selection Order

Discussion in 'AutoCAD' started by hawstom, Feb 20, 2004.

  1. hawstom

    hawstom Guest

    Many Thanks to Frank Oquendo for showing the solution to get multiple files in a WINAPI dialogue box as explained in other topics. It isn't short, but it works!

    I still have one question now that the file selection is up and running as demonstrated in the QT (Quantity Takeoff) toolbar button of the app I am pushing as Construction Notes Manager (I will resist the temptation to give my web site). I will send code on request.

    QUESTION: Is there a published standard behavior for the order of multiple files selected? They seem to come in backwards of what I would have expected. Is this standard behavior? The last file selected is put at the front of the list. Should I just rely on this behavior and always reverse the list?
     
    hawstom, Feb 20, 2004
    #1
  2. It gets even better. Try selecting a group of files by picking the
    first one and then holding down the shift key while you select the last
    one. The order will be last file selected followed by all the files
    between the first and the last (in order) followed by the first file.
    Nifty, huh?
     
    Chuck Gabriel, Feb 23, 2004
    #2
  3. hawstom

    hawstom Guest

    Then I suppose all a developer is left to do is decide what SHE thinks is the most intuitive behavior and sort to emulate it without regard to the behavior of the WINAPI file selection. What do you do about this--just let the user sort the results manually? I can't imagine releasing a product with this behavior.
     
    hawstom, Feb 24, 2004
    #3
  4. I seem to recall a time when the file dialogs would return the files in the
    actual order in which they were selected, but that might just be my imagination.

    As far as knowing how to sort is concerned, that would require a bit of ESP
    since I don't know of any way to tell what order the user REALLY selected the
    files in. I guess you could sort them alphabetically, but that would be kind of
    presumptuous. Honestly, the best you can do is probably to just let your users
    figure out for themselves what kind of results to expect when dealing with file
    dialogs.

    Convincing them that it isn't your fault might be a challenge, though.


    most intuitive behavior and sort to emulate it without regard to the behavior of
    the WINAPI file selection. What do you do about this--just let the user sort
    the results manually? I can't imagine releasing a product with this behavior.
     
    Chuck Gabriel, Feb 25, 2004
    #4
  5. hawstom

    hawstom Guest

    :-D :-D :-D

    I think that if you select one at a time, they do come in predictably backwards. Only when you ctrl-a, shift-pick, ctrl-pick, etc, do things get crazy. I think I will experiment, find the few predictable cases, and build around them. I have a hunch that reversing the order may be the key. I will let you know.

    Thx again,

    Tom Haws
    Find me at Google
     
    hawstom, Feb 26, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.