From: Gerhard Reithofer on
Hi TCLers,
my ActiveTCL seems to be sick.

$tclsh
% package require tablelist
; ### NO version number! Tk loaded.
% info pa
8.5.8
% tablelist::tablelist .tl -columns {0 Left 0 Mid 0 Rigth}
; ### NO window path!
% pack .tl
bad window path name ".tl"
% package require ftp
2.4.9

$ teacup list tablelist
entity name version platform
------- --------- ------- --------
package tablelist 4.6 tcl
package tablelist 4.6.1 tcl
package tablelist 4.7 tcl
package tablelist 4.8 tcl
package tablelist 4.8.1 tcl
package tablelist 4.9 tcl
package tablelist 4.9.1 tcl
package tablelist 4.9.2 tcl
package tablelist 4.10 tcl
package tablelist 4.10.1 tcl
package tablelist 4.11 tcl
package tablelist 4.11.1 tcl
package tablelist 4.11.2 tcl
package tablelist 4.12 tcl
package tablelist 4.12.1 tcl
package tablelist 5.0 tcl
package tablelist 5.1 tcl
------- --------- ------- --------
17 entities found

$ teacup list --only uninstalled tablelist
0 entities found

$ tclsh
% package require -exact tablelist 5.0
can't find package tablelist exactly 5.0
% package require -exact tablelist 5.1

% package require -exact tablelist 5.1
can't set "usingTile": it is not allowed to use both Tablelist and
Tablelist_tile in the same application
%

Any hints?

BTW: I did a teacup upgrade some time ago.

A few questions:
How can I check which file is loaded on package require?
How can I check which version of a package is installed (teacup)?

--
Gerhard Reithofer
Tech-EDV Support Forum - http://support.tech-edv.co.at
From: Larry W. Virden on
On Jul 1, 8:10 am, Gerhard Reithofer <gerhard.reitho...(a)tech-
edv.co.at> wrote:

>
> A few questions:
>   How can I check which file is loaded on package require?
>   How can I check which version of a package is installed (teacup)?
>

Have you read http://wiki.tcl.tk/9859 (or, as I got to it, <
http://wiki.tcl.tk/package+require > )? I notice on that page a
mention of using package ifneeded to determine the script that loaded
a package...
From: Andreas Kupries on
Gerhard Reithofer <gerhard.reithofer(a)tech-edv.co.at> writes:

> Hi TCLers,
> my ActiveTCL seems to be sick.
>
> $tclsh
> % package require tablelist
> ; ### NO version number! Tk loaded.

Ok. It found some tablelist, and ran code, at least as far as forcigin
Tk in. It likely has loaded tablelist, otherwise it should thrown the
error 'can't find package ...'


> % info pa
> 8.5.8
> % tablelist::tablelist .tl -columns {0 Left 0 Mid 0 Rigth}
> ; ### NO window path!

Unknown what this is

> $ tclsh
> % package require -exact tablelist 5.0
> can't find package tablelist exactly 5.0

Hm.

> % package require -exact tablelist 5.1
>
> % package require -exact tablelist 5.1
> can't set "usingTile": it is not allowed to use both Tablelist and
> Tablelist_tile in the same application
> %
>
> Any hints?
>
> BTW: I did a teacup upgrade some time ago.

First guess is that something is broken with 5.1, either with the
result of my build, or in the sources.

I have 5.0 in my personal setup and that works as expected


> A few questions:
> How can I check which version of a package is installed (teacup)?

To query the local repository with 'teacup list' use the --at-default option

% teacup list --at-default tablelist

> How can I check which file is loaded on package require?

Take the version number V returned from the package require (*), and run

% package ifneeded tablelist <V>

(*) In your case, with no version number at all, I would recommed to
try V = 5.1 and V = 5.0

The result for my system, where V = 5.0, is

package provide tablelist 5.0;source /home/aku/opt/ActiveTcl/lib/teapot/package/tcl/teapot/tcl8/8.0/tablelist-5.0.tm


And now I will install 5.1, lets see what happens

% teacup install tablelist 5.1
Retrieving package tablelist 5.1 tcl ...@ http://teapot.activestate.com ... Ok
Retrieving package tablelist::common 5.1 tcl ...@ http://teapot.activestate.com ... Ok
Installing into /home/aku/opt/ActiveTcl/lib/teapot

Ok, that worked. As did using it. See my session below

> tclsh8.5
% package require tablelist
5.1
% package ifneeded tablelist 5.1
package provide tablelist 5.1;source -encoding utf-8 /home/aku/opt/ActiveTcl/lib/teapot/package/tcl/teapot/tcl8/8.0/tablelist-5.1.tm
% package ifneeded tablelist::common 5.1

set dir {/home/aku/opt/ActiveTcl/lib/teapot/package/tcl/lib/tablelist_common5.1}
eval "namespace eval ::tablelist { proc DIR {} {return [list $dir]} } ; source [list [file join $dir tablelistPublic.tcl]]"

# ACTIVESTATE TEAPOT-PKG BEGIN DECLARE

package provide tablelist::common 5.1

# ACTIVESTATE TEAPOT-PKG END DECLARE

% info pa
8.5.8
% tablelist::tablelist .tl -columns {0 Left 0 Mid 0 Rigth}
..tl
% pack .tl

// checking the toplevel, the tablelist appeared

% exit


There has to be something in your local setup which is different from
mine which causes your problems.


--
So long,
Andreas Kupries <akupries(a)shaw.ca>
<http://www.purl.org/NET/akupries/>
Developer @ <http://www.activestate.com/>
-------------------------------------------------------------------------------
From: Csaba Nemethi on
Am 01.07.2010 19:11, schrieb Andreas Kupries:
> And now I will install 5.1, lets see what happens
>
> % teacup install tablelist 5.1
> Retrieving package tablelist 5.1 tcl ...@ http://teapot.activestate.com ... Ok
> Retrieving package tablelist::common 5.1 tcl ...@ http://teapot.activestate.com ... Ok
> Installing into /home/aku/opt/ActiveTcl/lib/teapot

Just for the sake of completeness: Besides

teacup install tablelist 5.1

it is highly recommended to execute

teacup install tablelist_tile 5.1

Instead of the two commands above, I used

teacup update --only newer

which retrieved and installed all the three packages tablelist 5.1,
tablelist::common 5.1, and tablelist_tile 5.1.

--
Csaba Nemethi http://www.nemethi.de mailto:csaba.nemethi(a)t-online.de

From: Gerhard Reithofer on
Hi Andreas,
I'll try your suggestions step by step.

On Thu, 1 Jul 2010, Andreas Kupries wrote:

> Gerhard Reithofer <gerhard.reitho...(a)tech-edv.co.at> writes:
>
> > Hi TCLers,
> > my ActiveTCL seems to be sick.

....

1st of all I reinstalled tablelist 5.1

$ teacup install tablelist 5.1Resolving tablelist 5.1 ... [package
tablelist 5.1 tcl @ http://teapot.activestate.com]
Resolving Tcl 8 -is package ... [package Tcl 8.5.8 _ ... Installed
outside repository, probing dependencies]
Resolving Tk 8 -is package ... [package Tk 8.5.8 _ ... Installed outside
repository, probing dependencies]
Resolving tablelist::common 5.1-5.1 -is package ... [package
tablelist::common 5.1 tcl ... Already installed in repository, probing
dependencies]

Retrieving package tablelist 5.1 tcl ...@ http://teapot.activestate.com
.... Ok

Installing into /opt/ActiveTcl-8.5/lib/teapot

Installing package tablelist 5.1 tcl

teacup list --at-default tablelist
entity name version platform
------- --------- ------- --------
package tablelist 4.12.1 tcl
package tablelist 5.1 tcl
------- --------- ------- --------
2 entities found

==================================
$ tclsh
% gerhard(a)nbl350:~$ tclsh
% package require tablelist
# again no version number, but the toplevel comes up.
% package ifneeded tablelist 5.1
package provide tablelist 5.1;source -encoding utf-8
/opt/ActiveTcl-8.5/lib/teapot/package/tcl/teapot/tcl8/8.0/tablelist-5.1.tm


New try:
==================================
$ tclsh
% package provide tablelist 5.1;source
/opt/ActiveTcl-8.5/lib/teapot/package/tcl/teapot/tcl8/8.0/tablelist-5.1.tm

%
Again nothing is returned.

Next try:
==================================
$ tclsh
% package require tablelist
# again no version number
% package ifneeded tablelist 5.1
package provide tablelist 5.1;source -encoding utf-8
/opt/ActiveTcl-8.5/lib/teapot/package/tcl/teapot/tcl8/8.0/tablelist-5.1.tm
% package ifneeded tablelist::common 5.1

set dir
{/opt/ActiveTcl-8.5/lib/teapot/package/tcl/lib/tablelist_common5.1}
eval "namespace eval ::tablelist { proc DIR {} {return [list
$dir]} } ; source [list [file join $dir tablelistPublic.tcl]]"

# ACTIVESTATE TEAPOT-PKG BEGIN DECLARE

package provide tablelist::common 5.1

# ACTIVESTATE TEAPOT-PKG END DECLARE

% tablelist::tablelist .tl -columns {0 Left 0 Mid 0 Rigth}

%

I try to process each line of tablelist-5.1.tm
==================================
$ tclsh
% package provide tablelist 5.1
% package require Tcl 8
8.5.8
% package require Tk 8
8.5.8
% package require -exact tablelist::common 5.1
5.1
% package provide tablelist $::tablelist::version
% package provide Tablelist $::tablelist::version
% ::tablelist::useTile 0
% ::tablelist::createBindings

%

Repeating "useTile" leads to:
==================================
% ::tablelist::useTile 0
can't set "usingTile": it is not allowed to use both Tablelist and
Tablelist_tile in the same application

Trying the same with "old" tablelist:
==================================
$ tclsh
% package require -exact tablelist 4.12.1
4.12.1
% package ifneeded tablelist 4.12.1
package provide tablelist 4.12.1;source -encoding utf-8
/opt/ActiveTcl-8.5/lib/teapot/package/tcl/teapot/tcl8/8.0/tablelist-4.12.1.tm

The 2 tm-files for 5.1 and 4.12.1 re identical except of the version
numbers.

Next try:
==================================
$ tclsh
% package require tablelist

% info procs ::tablelist::*
::tablelist::reconfigWindows ::tablelist::doCellConfig
::tablelist::doRowConfig ::tablelist::doColCget
::tablelist::createTileAliases ::tablelist::winnativeTreeImgs
::tablelist::flat7x5Arrows ::tablelist::flat8x5Arrows
::tablelist::flat9x5Arrows ::tablelist::oxygen1TreeImgs
::tablelist::winxpSilverTreeImgs ::tablelist::extendConfigSpecs
::tablelist::oxygen2TreeImgs ::tablelist::doRowCget
::tablelist::doCellCget ::tablelist::isCellEditable
::tablelist::createCheckbuttonImgs ::tablelist::vistaClassicTreeImgs
::tablelist::vistaAeroTreeImgs ::tablelist::winxpBlueTreeImgs
::tablelist::doColConfig ::tablelist::getCellFont
::tablelist::flat6x4Arrows ::tablelist::restoreUsingTile
::tablelist::flat7x4Arrows ::tablelist::plastiqueTreeImgs
::tablelist::sunken10x9Arrows ::tablelist::aquaTreeImgs
::tablelist::phaseTreeImgs ::tablelist::makeListVar
::tablelist::flat10x6Arrows ::tablelist::winxpOliveTreeImgs
::tablelist::DIR ::tablelist::doConfig ::tablelist::sunken8x7Arrows
::tablelist::flat7x7Arrows ::tablelist::flat9x7Arrows
::tablelist::createSortRankImgs ::tablelist::useTile
::tablelist::win7AeroTreeImgs ::tablelist::doCget
::tablelist::getEditWindow ::tablelist::sunken12x11Arrows
::tablelist::createTreeImgs ::tablelist::baghiraTreeImgs
::tablelist::gtkTreeImgs ::tablelist::klearlooksTreeImgs
::tablelist::win7ClassicTreeImgs
% llength [info procs ::tablelist::*]
48

==================================
$ tclsh
% package require -exact tablelist 4.12.1
4.12.1
% llength [info procs ::tablelist::*]
244
%

This list is much short compared to working.
Still no idea what fails.

PS: Andreas, what is your suggestion about imap4 package?

Thanks to all answering my questions.

--
Gerhard Reithofer
Tech-EDV Support Forum - http://support.tech-edv.co.at