Menu

#2630 Wrong directory name is returned by tk_chooseDirectory

obsolete: 8.5.7
open
5
2009-05-11
2009-05-11
No

Consider:

puts [tk_chooseDirectory]

if run in a directory (e.g., called parent), containing a sub-directory (e.g., called child), and the user selects the sub-directory and then hits Okay, the name of the parent directory is printed, not that of the selected child. In earlier versions of Tk (e.g., 8.4.13), the name of the selected sub-directory would be returned. This change in behaviour is very confusing.

Discussion

  • Daniel Towner

    Daniel Towner - 2009-05-11
    • summary: Wrong directory name is returned --> Wrong directory name is returned by tk_chooseDirectory
     
  • Donal K. Fellows

    What platform?

     
  • Daniel Towner

    Daniel Towner - 2009-05-12

    Platform: i686 GNU/Linux (Redhat Enterprise 5)

     
  • Koen Danckaert

    Koen Danckaert - 2009-05-12

    It seems this is another issue caused by ttk::button's focus behaviour.
    See http://wiki.tcl.tk/20050.

    The following is a workaround:
    bind TButton <1> {%W instate !disabled {%W state pressed}}