1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why Does @GETDIR Repeat Selected Directory Name In Returned Value

Discussion in 'Support' started by BitPusher, Jun 20, 2013.

  1. BitPusher

    Joined:
    Jan 9, 2009
    Messages:
    40
    Likes Received:
    0
    In:
    TCC 15.01.51 Windows XP [Version 5.1.2600]
    Copyright 2013 JP Software Inc. All Rights Reserved
    Registered to Carl Johnson

    (And also in V14)

    I have a directory Y:\ZTEMP_UE\ that contains two subdirectories; DIP0VIEWER00 and DIP0VIEWER01.

    When I execute the following command and select subdirectory DIP0VIEWER01 from the @GETFOLDER dialog it repeats the name of the selected directory in the returned value as the following shows:

    [C:\]ECHO %@GETDIR["Y:\ZTEMP_UE","Select DIP0 Viewer Directory"]
    Y:\ZTEMP_UE\DIP0VIEWER01\DIP0VIEWER01

    I would expect this to only return either Y:\ZTEMP_UE\DIP0VIEWER01 or possibly DIP0VIEWER01 but not the result I'm getting.

    Is this a bug, documentation issue, or user problem? I am able to bypass this issue using a kludge with %@LEFT with a %@INDEX that looks for the low-order \.

    Carl
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    Not reproducible here.

    How are you selecting the subdirectory?
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,883
    Likes Received:
    29
    I tried pretty hard to reproduce that when BitPusher first posted and I couldn't.

    Tonight I noticed something a little peculiar about that dialog. If I right click a folder, the default (bold, on the top) action is "Select" and below that is "Open". They both do the same thing, namely the "Open" action.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    It's a Windows common dialog.
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,883
    Likes Received:
    29
    I figured that and saw the same behavior in other apps.
     
  6. BitPusher

    Joined:
    Jan 9, 2009
    Messages:
    40
    Likes Received:
    0
    Sorry I've been slow to respond, but I hadn't gotten any replies initially and in the meanwhile my Raspberry Pi arrived and I've been mostly working with it and Linux the last week or so.

    Rex's question about how I selected the directory led me to experiment and found out the command works different ways depending on how you select the subdirectory. What I was doing was to highlight the subdirectory I wanted and then clicking on the Select command button. Using this method it repeats the name of the selected subdirectory as I stated. However, if you double-click the name of the desired subdirectory to get it to move to the "Look in" textbox and then click the Select command button it works as I would have expected.

    I can't remember encountering something like this before, but thank you for your replies. Usability-wise I like my method better, and since the @LEFT/@INDEX "corrects" the issue, that is what I'll continue to use.

    Carl
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    I had tried that way initially (and just verified it again), but cannot reproduce your issue.

    Are you using the standard Windows common dialogs, or do you have something that's replacing them with different versions (like a screen / theme manager)?
     
  8. BitPusher

    Joined:
    Jan 9, 2009
    Messages:
    40
    Likes Received:
    0
    Rex,
    As far as I know I have no screen/theme manager installed other than the default Windows XP. You don't need to spend any more time on this on my account because when I first had the problem I used my text editor to search through about 19 years of current and old .BAT and .BTM files for the string "@GETDIR" to find a sample where I had used it before but got no hits, so it is not a big issue for me.

    The only thing running on my desktop at the time was the Take Command window, Windows XP Performance Monitor, and jetToolBar ("hidden" at the top of the screen). I have not seen any unusual/unexpected behavior in any directory/file section dialogs in any other application.

    Maybe one (very) outside possibility is that in a Corel Photo-Paint VBA program I have a call to the shell function Shell.BrowseForFolder but I don't think that would affect the overall system theme, etc. and I wasn't running that application at the time. This function is similar to @GETDIR in operation and it works as expected. The only operational difference is that when you select a directory it then shows the next (unselected) lower-level directory but leaves the selected directory selected.

    It could also be a Windows problem or a fluke. You might remember several versions ago I posted that my F6 key in Take Command quit working to bring up Dir History, but in the next release it functioned again. Who knows???

    Thanks again,
    Carl
     

Share This Page