From: Keith Nash on 5 May 2010 06:26 cattaghia wrote: > 1) "package require Tk" in a normal ("trusted") interp works > flawlessly and fast. In a "vanilla safe" interp (created by "interp > create -safe") it does not work, period. In a SafeBase interp created > without values passed through the -accessPath option, all the > directories in the master's auto_path and tcl_pkgPath are scanned for > pkgIndex.tcl files (in my system, this includes a browse through all > the directories under /usr/lib, which results in a +-25s delay) and > finally the error message "not allowed to start Tk by master's > safe::TkInit" appears. In this case the Safe Base interpreter will use the same access path as its master interpreter. /usr/lib has probably been added to the auto_path because wish or the Tcl script is in /usr/bin - as long as the Tcl-specific directories are also in the auto_path, it is a good idea to remove /usr/lib from the master's auto_path before creating the Safe Base slave. This will greatly speed up package discovery. If you are using your distro's Tcl/Tk, it is also worth trying ActiveState's ActiveTcl - the distros' Tcl/Tk are often out of date, and there have been bugfixes recently in the Safe Base. 3,4) I haven't tried using a labelframe as a container, perhaps someone else can comment on that? Keith. |