Dear Simon and list members, As many of you are aware, when X11 isn't installed on Mac OS X, loading the tcltk package produces an error, with a message that many users find cryptic. There was yet another instance of this problem reported to the list today.
I'm interested in the issue because the Rcmdr package uses tcltk and thus fails to load when X11 is absent. Rcmdr users tend to be inexperienced and so, unless they find their way to the Rcmdr installation webpage, where detailed installation instructions are provided, they tend to be stymied by the problem. If I could, I'd intercept the problem by checking capabilities()["X11"] in the Rcmdr .onLoad() or .onAttach() function, but because the Rcmdr package imports the tcltk namespace, the error occurs before these startup functions are executed -- a chicken-and-egg problem. It occurs to me that tcltk could fail more gracefully on Mac OS X when X11 is absent, perhaps popping up a webpage in a browser with instructions and a link for installing XQuartz. I'd do this myself in the Rcmdr package if I could. Or tcltk could check for the presence of X11 and not try to start it if it's absent, reporting a warning rather than throwing an error. Alternatively, I'd be grateful if someone could suggest how I might detect the problem in the Rcmdr package before loading fails. The only thing that I could think of was writing a separate RcmdrInstall package that bypasses tcltk, but that would be awkward and would only help users who discovered that RcmdrInstall exists. Thanks, John ----------------------------------------------- John Fox, Professor McMaster University Hamilton, Ontario, Canada http://socserv.socsci.mcmaster.ca/jfox/ _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac