Re: tk_getopenfile -initialdir in MacOS 10.6

Pat Thoyts <[email protected]> Fri, 22 Jan 2010 09:32:40 +0000
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
2010/1/22 Zbigniew Diaczyszyn <[email protected]>:
> The starkit packed code is:
>
> <code>
> set dir [pwd]
> set filename [tk_getopenfile -initialdir $dir]
> </code>
>
> is working fine in a starkit compiled with linux runtime whereas my friend
> tells me that in his MacOS 10.6 the initial directory is ":/".
>
> Googling for some time there is the message
>
> "It works on Linux because there is no native dialog there. The Linux
> version uses the tk dialog provided by the tk library."
>
> And five years ago Jeffrey Hobbs proposes:
>
> <code>
>        proc ::tk_getOpenFile {args} {
>                return [eval ::tk::dialog::file:: open $args]
>        }
> </code>
>
> Is this still the state of art?

Yes - for both Windows and MacOSX. The native dialog has no
understanding of the tcl virtual filesytem and so cannot browse
withing the vfs. You can test for the filesystem at a given path using
[file system $path]. For vfs the [lindex [file system $path] 0] will
yield tclvfs or 'native' for a native filesystem.

Pat Thoyts

-- 
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/starkit?hl=en