Prev: Regex for Twitter usernames: need to exclude e-mail addresses
Next: Evaluating a complex list as a recursive command call?
From: Andreas Leitgeb on 7 Jul 2010 07:39 Gerhard Reithofer <gerhard.reithofer(a)tech-edv.co.at> wrote: > On Tue, 6 Jul 2010, Andreas Leitgeb wrote: >> Gerhard Reithofer <gerhard.reitho...(a)tech-edv.co.at> wrote: >> > % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} >> > % info procs ::tablelist::tablelist >> > % >> > @*: How can "no pocedure" become executed without error? >> There's also [info commands ...] >> Not every tcl-command is a procedure. >> Even scripts can create commands that are not procedures: >> e.g. namespace ensemble, tk-widgets, interp-aliases,... >> And finally (but unlikely) it could also be [unknown]-magic. >> (then it wouldn't even show up with [info commands], but could >> still be "executed" without error) > Also no reaction! > $ tclsh > % package require tablelist I'm somewhat surprised, that this returned neither an error nor a version. Is it possible, that stderr got redirected to /dev/null or something? (e.g. in your ~/.tclshrc) > % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} > % info commands ::tablelist::tablelist > This must be a bug in TCL/Tk .. ??? Have you also looked into [info body unknown] ? Replace it with your own, just to see, if it was involved: $ tclsh % package require tablelist % proc unknown args { puts "Unknown: $args" } % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} and see if [unknown] got called. If yes, then your tcl-"puzzle" is solved, otherwise, we gotta search further: % namespace eval ::tablelist {namespace unknown} (perhaps, the tablelist-namespace has it's own unknown-handler)
From: Andreas Leitgeb on 7 Jul 2010 07:53 Andreas Leitgeb <avl(a)gamma.logic.tuwien.ac.at> wrote: > Gerhard Reithofer <gerhard.reithofer(a)tech-edv.co.at> wrote: >> % package require tablelist > > I'm somewhat surprised, that this returned neither an error nor > a version. Is it possible, that stderr got redirected to > /dev/null or something? (e.g. in your ~/.tclshrc) And furthermore, let's debug your package require: what do these commands return on your site: package require Tcl package require Tcl 9.0 If these return nothing (no version and no error), then something is severely hosed on your system, independently of tablelist.
From: Gerhard Reithofer on 7 Jul 2010 13:05 Hallo Andreas, On Wed, 7 Jul 2010, Andreas Leitgeb wrote: > Gerhard Reithofer <gerhard.reitho...(a)tech-edv.co.at> wrote: > > On Tue, 6 Jul 2010, Andreas Leitgeb wrote: > >> Gerhard Reithofer <gerhard.reitho...(a)tech-edv.co.at> wrote: > >> > % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} > >> > % info procs ::tablelist::tablelist > >> > % > >> > @*: How can "no pocedure" become executed without error? > >> There's also [info commands ...] > >> Not every tcl-command is a procedure. > >> Even scripts can create commands that are not procedures: > >> e.g. namespace ensemble, tk-widgets, interp-aliases,... > >> And finally (but unlikely) it could also be [unknown]-magic. > >> (then it wouldn't even show up with [info commands], but could > >> still be "executed" without error) > > > Also no reaction! > > $ tclsh > > % package require tablelist > > I'm somewhat surprised, that this returned neither an error nor > a version. Is it possible, that stderr got redirected to > /dev/null or something? (e.g. in your ~/.tclshrc) ~/.tclshrc doesn't exist An empty line is returned. > > % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} > > % info commands ::tablelist::tablelist > > This must be a bug in TCL/Tk .. ??? > > Have you also looked into [info body unknown] ? > Replace it with your own, just to see, if it was involved: > $ tclsh > % package require tablelist > % proc unknown args { puts "Unknown: $args" } > % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} > and see if [unknown] got called. -------------------------------------------- $ tclsh % package require tablelist ;;; ### One blank line here % proc unknown args { puts "Unknown: $args" } % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} Unknown: ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} % > If yes, then your tcl-"puzzle" is solved, But it should return invalid command name "::tablelist::tablelist" if we do not define our own "unknown" - or? -------------------------------------------- $ tclsh % package require tablelist % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} % ::tablelist::unknownproc invalid command name "::tablelist::unknownproc" % > otherwise, we gotta search further: > % namespace eval ::tablelist {namespace unknown} > (perhaps, the tablelist-namespace has it's own unknown-handler) -------------------------------------------- % namespace eval ::tablelist {namespace unknown} % % interp aliases ::tk::frame ::pkg::create ::tk::label ::ttk::paned % I got several mails in the meantime, which have tested the same confuguration and everything worked. I don't want to steal your time, I only will continue this thread if people are interested in analyzing this strange behavior or want to find out the basic reason. So I'm not disappointed if no answer is provided. I will smash the complete ActiveTCL directory and reinstall the complete staff fresh in a few days and I'm rather sure that it will work. If someone is interested in additional analyzing the problem, please help me finding it out. But it is more an athletic discipline than a necessity. Thanks for all the help, I will inform you after reinstallation of if I found the "strange" reason. IMHO it's undoubtful an "interesting" problem. -- Gerhard Reithofer Tech-EDV Support Forum - http://support.tech-edv.co.at
From: Andreas Leitgeb on 7 Jul 2010 14:18 Gerhard Reithofer <gerhard.reithofer(a)tech-edv.co.at> wrote: > $ tclsh > % package require tablelist > ;;; ### One blank line here > % proc unknown args { puts "Unknown: $args" } > % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} > Unknown: ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} > % So, there are two mysteries left: - why does package require finish atypically? try: catch {package require tablelist} msg puts ">>>$msg<<<" to see the return-code and the actual message. (probably it did error out, but with an empty error-message) set errorInfo also might give further hints. - what does the original [::unknown] do with ::tablelist::tablelist? What happens, if you enter ::tablelist::tablelist on unix shell (yeah, not in tclsh!) ? Also, have a look at the default [::unknown] and define various of those auto_no* variables to disable specific parts, until you really get an error back. > I don't want to steal your time, ... I'm somewhat curious, too. I'd like to see, if after, say, up to four more cycles we'll at least know, what really got called for ::tablelist::tablelist. If this diagnosis blocks you from your work, perhaps you can try to move the broken installation to another path (or another machine), to have the broken one and a newly installed working one both available.
From: Gerhard Reithofer on 7 Jul 2010 19:01
On Wed, 7 Jul 2010, Andreas Leitgeb wrote: > Gerhard Reithofer <gerhard.reithofer(a)tech-edv.co.at> wrote: > > $ tclsh > > % package require tablelist > > ;;; ### One blank line here > > % proc unknown args { puts "Unknown: $args" } > > % ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} > > Unknown: ::tablelist::tablelist .t -columns {0 Left 0 Center 0 Right} > > % > > So, there are two mysteries left: > - why does package require finish atypically? > try: catch {package require tablelist} msg > puts ">>>$msg<<<" > to see the return-code and the actual message. > (probably it did error out, but with an empty error-message) > set errorInfo > also might give further hints. Bingo - Mr. Sherlock Holmes ;-) $ tclsh % catch {package require tablelist} msg 1 % puts ">>>$msg<<<" >>><<< % set errorInfo while executing "image create photo tablelist_gtk_collapsedImg -data " iVBORw0KGgoAAAANSUhEUgAAABIAAAAOCAYAAAAi2ky3AAAABGdBTUEAALGPC/xhBQAAABl0RVh0 U29mdHdhcmUAUGFpbnQ..." (procedure "gtkTreeImgs" line 8) invoked from within "${treeStyle}TreeImgs " (procedure "extendConfigSpecs" line 287) invoked from within "extendConfigSpecs " (in namespace eval "::tablelist" script line 148) invoked from within "namespace eval tablelist { # # Get the current windowing system ("x11", "win32", "classic", or "aqua") # variable winSys if {[catc..." (file "/opt/ActiveTcl-8.5/lib/teapot/package/tcl/lib/tablelist_common5.1/scripts/tablelistWidget.tcl" line 19) invoked from within "source /opt/ActiveTcl-8.5/lib/teapot/package/tcl/lib/tablelist_common5.1/scripts/tablelistWidget.tcl" (in namespace eval "::" script line 1) invoked from within "namespace eval :: $auto_index($name)" (procedure "auto_load" line 35) invoked from within "auto_load $name [uplevel 1 {::namespace current}]" (autoloading "::tablelist::createBindings") (procedure "::unknown" line 30) invoked from within "::tablelist::createBindings" (file "/opt/ActiveTcl-8.5/lib/teapot/package/tcl/teapot/tcl8/8.0/tablelist-5.1.tm" line 36) invoked from within "source -encoding utf-8 /opt/ActiveTcl-8.5/lib/teapot/package/tcl/teapot/tcl8/8.0/tablelist-5.1.tm" ("package ifneeded tablelist 5.1" script) invoked from within "package require tablelist" % ======================================================= Now to the next problematic step. In file /opt/ActiveTcl-8.5/lib/teapot/package/tcl/lib/tablelist_common5.1/scripts/tablelistImages.tcl I find the command (assuming tcl 8.5 or 8,6 and img::png package present): % set gtk_collapsedImg \ [image create photo tablelist_gtk_collapsedImg -data " iVBORw0KGgoAAAANSUhEUgAAABIAAAAOCAYAAAAi2ky3AAAABGdBTUEAALGPC/xhBQAAABl0RVh0 U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMtfuaUMAAABTSURBVDhPtdLBDQAgCANA376YgTmcj8UY TG2iiV9t7QAX0lLKxzSJbWZ9QjwGyN15DFBm8hgghMY2RGMnBCwi+hqgXq0pv0jSEY2gA+kfST77 FRmz+lZUJ0vkXgAAAABJRU5ErkJggg== "] % This command should return the image name (like for GIF): % set gtk_collapsedImg \ [image create photo tablelist_gtk_collapsedImg -data " R0lGODlhEgAOAPcAAAAAABAQECIiIoaGhsPDw////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAASAA4A AAg5AP8JHEiwoMGDCAkGSIgwgACGBgMQeAhxYIACEysKvIiRIkSOBQYs/Figo8aLGU+mPOnxpMaX BAMCADs= "] tablelist_gtk_collapsedImg % Next step: Calling wish /opt/ActiveTcl-8.5/lib/teapot/package/linux-glibc2.3-x86_64/lib/activestate_activetcl_demos8.4/Img/demo.tcl All type of images are visible except the PNGs: "error displaying color image:", "error displaying grayscale image:", "error displaying transparent color image:" and "error displaying transparent grayscale image:" Additional investigations follow. Thanks for leading onto the correct road, Andreas. -- Gerhard Reithofer Tech-EDV Support Forum - http://support.tech-edv.co.at |