From: Bernard D. <bde...@ea...> - 2003-08-28 11:38:02
|
I don't know exactly if it is like this by design or if it is an inconsistency but tclAE::build::filename and tclAE::build::foldername behave differently wrt path types. If you have a file f «» set f /Applications/Alpha/Foo/bar.tcl /Applications/Alpha/Foo/bar.tcl and apply tclAE::build::filename to it, you get «» tclAE::build::filename $f obj{want:type('file'), from:'null'(), form:'name', seld:hd1:Applications:Alpha:Foo:bar.tcl } In the 'seld' parameter, it is transformed into a Finder path. That's fine because it is what the tclAE::send command expects. Now if you apply tclAE::build::foldername to the parent folder; you obtain: «» tclAE::build::foldername /Applications/Alpha/Foo/ obj{want:type('cfol'), from:'null'(), form:'name', seld:/Applications/Alpha/Foo/ } The 'seld' parameter remains in POSIX form. Nevertheless, if you need to specify a folder in a tclAE::send command, it expects a Finder path, just like it does with files. So you have to transform your path from POSIX to Finder style with file::unixPathToFinder (after removing the ending slash) «» file::unixPathToFinder /Applications/Alpha/Tcl/Foo hd1:Applications:Alpha:Tcl:Foo Not a big deal, just a bit surprising. Is there a reason for tclAE::build::filename and tclAE::build::foldername to behave differently like this ? Cheers Bernard PS This is all on OSX. |