Eskil

Diff
Login

Differences From Artifact [aeee97dbc7]:

To Artifact [831e6dce75]:


1956
1957
1958
1959
1960
1961
1962







1963

1964
1965

1966
1967
1968
1969
1970
1971
1972
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969

1970
1971

1972
1973
1974
1975
1976
1977
1978
1979







+
+
+
+
+
+
+
-
+

-
+







        }
    }
    return [file isdirectory $file]
}

# A wrapper for tk_getOpenFile
proc myOpenFile {args} {
    array set opts $args
    set isVfs 0
    if {[info exists opts(-initialdir)]} {
        if {[string match tclvfs* [file system $opts(-initialdir)]]} {
            set isVfs 1
        }
    }
    # When in tutorial mode, make sure the Tcl file dialog is used
    # When in a vfs, make sure the Tcl file dialog is used
    # to be able to access the files in a starkit.
    if {[info exists ::eskil(tutorial)] && $::eskil(tutorial)} {
    if {$isVfs} {
        # Only do this if tk_getOpenFile is not a proc.
        if {[info procs tk_getOpenFile] eq ""} {
            # If there is any problem, call the real one
            if {![catch {set res [::tk::dialog::file:: open {*}$args]}]} {
                return $res
            }
        }