From: Daniel A. S. <st...@ic...> - 2004-07-20 06:54:30
|
John, On 19/07/2004, at 6:35, John Seal wrote: > This didn't get a response on c.l.t so I'm reposting it here. Is this > something that broke between 8.4.5 and 8.4.6 in TclTkAquaBI? > > I've been playing around with Will Duquette's Notebook. Since it's a > starkit, it launches with Wishkit instead of Wish Shell. I had figured > out how to create safe interpreter "sandboxes" running Tk, but sometime > in the last few weeks it quit working, and I don't know why. I didn't > change Notebook (still using the latest "stable" release, 2.0.3). I > reinstalled TclTkAquaBI 8.4.6. > > Take a look at the transcripts below. Note that Wishkit complains when > trying to create a safe interpreter, even though it *does* create it. looks like that's a bug in wishkit, if you look in Wishkit.app/Contents/Frameworks/Tcl.framework/Resources/Scripts you'll see that init.tcl is the script set tcl_pkgPath [lsearch -all -inline $tcl_pkgPath [file join [file dirname [file dirname [info nameofexecutable]]] *]] source [file join [file dirname [info script]] realinit.tcl] which is supposed to source the real init.tcl, this was done to mimic tclkit's default auto_path which only includes directories inside the tclkit vfs. I hadn't tested this with safe interps however, probably [file dirname] fails in a safe interp, so we need to come up with something else; maybe just prepending the tcl_pkgPath line to the original init.tcl would be easiest. Thanks for bringing this to my attention. Maybe you could file a bug in the tcltkaqua project at SF so that this doesn't get lost? > Another problem, not shown below, is that I used to be able to say > "package require Tk" on the Notebook "User Code" page, but now it says > it can't find package Tk. I'm racking my brains trying to figure out > what's changed. Any ideas? not sure what you mean, [package require Tk] works for me in Wish and Wishkit Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |