Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tablelist make error

26 views
Skip to first unread message

Yu Sai

unread,
Jun 16, 2013, 1:47:15 AM6/16/13
to
Hello, I wish the following example of gridplus2 in winXP that present error messages. But it's OK in Win7.
TCL :ActiveTCL 8.5 ,Tablelist:5.9

Example
======
package require gridplus
namespace import gridplus::*

gridplus tablelist .mytable {
4 "Column1"
4 "Column2"
0 "Column3"
}

gridplus layout .main -wtitle "Tablelist Example" {
.mytable
}

pack .main
======

error message
======
can't access "::tablelist::ns.::data": parent namespace doesn't exist
can't access "::tablelist::ns.::data": parent namespace doesn't exist
while executing
"upvar ::tablelist::ns${win}::data data"
(procedure "tablelist::addActiveTag" line 2)
invoked from within
"tablelist::addActiveTag ."
(command bound to event)
======

nemethi

unread,
Jun 16, 2013, 6:51:22 AM6/16/13
to sai...@gmail.com
I am nearly sure you named your test script "tablelist.tcl" on Windows
XP but chose a different name for it on Windows 7. The application name
"tablelist.tcl" will cause the main window "." to have the class name
"Tablelist", hence wish will associate the Tablelist class bindings with
it, which, of course, cannot work.

This is a quite general problem and has nothing to do with Tablelist.
Regardless of what kinds of widgets your script contains, if you name it
"entry.tcl", "listbox.tcl", "text.tcl", etc., you will get some error
message, because the class name of "." will be "Entry", or "Listbox", or
"Text", etc., and wish will activate the corresponding class bindings
for it.

Please remember: Never, never name your scripts "entry.tcl",
"listbox.tcl", "text.tcl", "tablelist.tcl", etc. on Windows, or else you
will very probably get unexpected error messages.

On UNIX the rule is: Never, never name your scripts "entry", "Entry",
"listbox", "Listbox", "text", "Text", "tablelist", "Tablelist", etc., or
else you will very probably get unexpected error messages.

--
Csaba Nemethi http://www.nemethi.de mailto:csaba....@t-online.de

0 new messages