Skip to content

Problem with tcltk package: tclfile.dir missing?

2 messages · Seth Falcon, Peter Dalgaard

#
Hi,

In R version 2.4.0 beta (2006-09-24 r39502) I'm seeing the following
behavior with the tcltk package:
Loading Tcl/Tk interface ... done
Error: 'tkfile.dir' is defunct.
Use 'tclfile.dir' instead.
See help("Defunct")
Error: object "tclfile.dir" not found

## But the function is in the package, just not exported?
function (...) 
tcl("file", "dir", ...)
<environment: namespace:tcltk>


--
+ seth
#
Seth Falcon <sfalcon at fhcrc.org> writes:
Heh, this obviously hasn't been exercised much... The issue is that
NAMESPACE contains

exportPattern("^tcl[[:alnum:]]*($|<-)") # skip S3 methods
exportPattern("^tk")

so the tk --> tcl prefix change doesn't automatically work on
functions with a dot in them. tclfile.tail is the only other case that
I can spot.

Best to fix in the obvious way at the current stage, but I wonder
whether it wouldn't have been better just to have tclfile("dir",
myfile) -- or for that matter just let users use the straightforward
tcl("file", "dir", myfile). (Or dirname(myfile) for that matter).