Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

For every problem there is one solution which is simple, neat, and wrong. -- H. L. Mencken


devel / comp.lang.tcl / Re: Problem with namespace import

SubjectAuthor
* Problem with namespace importCecil Westerhof
`* Problem with namespace importRich
 `* Problem with namespace importCecil Westerhof
  `* Problem with namespace importRich
   `* Problem with namespace importCecil Westerhof
    `* Problem with namespace importRich
     `- Problem with namespace importCecil Westerhof

1
Problem with namespace import

<877cx590ta.fsf@munus.decebal.nl>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10612&group=comp.lang.tcl#10612

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Cec...@decebal.nl (Cecil Westerhof)
Newsgroups: comp.lang.tcl
Subject: Problem with namespace import
Date: Sun, 29 Jan 2023 09:56:01 +0100
Organization: Decebal Computing
Lines: 16
Message-ID: <877cx590ta.fsf@munus.decebal.nl>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="60aa7f12d08810dbc752c546639d8565";
logging-data="2841730"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cYAIHLW/N+pqnTly1QD3cfMiPYetkBRo="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:kLu6sUKFVJC3AGD7jZvnB4Jj5FE=
sha1:aW6hGIcT6X44+XHk5MrHddg/qYc=
 by: Cecil Westerhof - Sun, 29 Jan 2023 08:56 UTC

I have a script that I have been using for years. As far as I know I
did not change it. In the part that creates the Tk stuff I do have:
namespace import :::bindMultiple

This gives:
import pattern ":::bindMultiple" tries to import from namespace "" into itself while executing "namespace import :::bindMultiple" (file "/home/cecil/bin/teaTk.tcl" line 1)
invoked from within "source ${scriptDir}/teaTk.tcl"
(file "/home/cecil/bin/chooseTea.tcl" line 72)

Has there changed something in tclsh?
If the namespace import is wrong: what should it be?

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Re: Problem with namespace import

<tr5tt9$2piqi$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10617&group=comp.lang.tcl#10617

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: Problem with namespace import
Date: Sun, 29 Jan 2023 13:55:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <tr5tt9$2piqi$3@dont-email.me>
References: <877cx590ta.fsf@munus.decebal.nl>
Injection-Date: Sun, 29 Jan 2023 13:55:53 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="dc88019474eaccf49546a08619447910";
logging-data="2935634"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+L3uppX9oVExeax8+th60k"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:VUMmyRSky8rVSC8e9KLx4XiRYPk=
 by: Rich - Sun, 29 Jan 2023 13:55 UTC

Cecil Westerhof <Cecil@decebal.nl> wrote:
> I have a script that I have been using for years. As far as I know I
> did not change it. In the part that creates the Tk stuff I do have:
> namespace import :::bindMultiple
>
> This gives:
> import pattern ":::bindMultiple" tries to import from namespace "" into itself while executing "namespace import :::bindMultiple" (file "/home/cecil/bin/teaTk.tcl" line 1)
> invoked from within "source ${scriptDir}/teaTk.tcl"
> (file "/home/cecil/bin/chooseTea.tcl" line 72)
>
> Has there changed something in tclsh?
> If the namespace import is wrong: what should it be?
>

::: is not a valid root namespace specifier (count the number of
colons).

Re: Problem with namespace import

<87h6w96ycc.fsf@munus.decebal.nl>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10618&group=comp.lang.tcl#10618

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Cec...@decebal.nl (Cecil Westerhof)
Newsgroups: comp.lang.tcl
Subject: Re: Problem with namespace import
Date: Sun, 29 Jan 2023 18:32:19 +0100
Organization: Decebal Computing
Lines: 33
Message-ID: <87h6w96ycc.fsf@munus.decebal.nl>
References: <877cx590ta.fsf@munus.decebal.nl> <tr5tt9$2piqi$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="60aa7f12d08810dbc752c546639d8565";
logging-data="3015287"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OIOVsZJfBRZgtbHI2CrTdVksxqMl0IYc="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:awy1WvooJ1+OqhGnDrDh57uH66w=
sha1:8VVWix+ntvTE+4jFfUj4nlKbfXI=
 by: Cecil Westerhof - Sun, 29 Jan 2023 17:32 UTC

Rich <rich@example.invalid> writes:

> Cecil Westerhof <Cecil@decebal.nl> wrote:
>> I have a script that I have been using for years. As far as I know I
>> did not change it. In the part that creates the Tk stuff I do have:
>> namespace import :::bindMultiple
>>
>> This gives:
>> import pattern ":::bindMultiple" tries to import from namespace "" into itself while executing "namespace import :::bindMultiple" (file "/home/cecil/bin/teaTk.tcl" line 1)
>> invoked from within "source ${scriptDir}/teaTk.tcl"
>> (file "/home/cecil/bin/chooseTea.tcl" line 72)
>>
>> Has there changed something in tclsh?
>> If the namespace import is wrong: what should it be?
>>
>
> ::: is not a valid root namespace specifier (count the number of
> colons).

That was what I also thought. But changing it to two did not help.
As far as I know the code has not been changed.
It seems that it should be something like:
namespace import PACKAGE::bindMultiple

But until now I did not manage to find the correct package.
(I must confess that I am not the most proficient searcher.)

Does anyone know which package I should use?

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Re: Problem with namespace import

<tr6be2$2s0jj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10619&group=comp.lang.tcl#10619

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: Problem with namespace import
Date: Sun, 29 Jan 2023 17:46:43 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <tr6be2$2s0jj$1@dont-email.me>
References: <877cx590ta.fsf@munus.decebal.nl> <tr5tt9$2piqi$3@dont-email.me> <87h6w96ycc.fsf@munus.decebal.nl>
Injection-Date: Sun, 29 Jan 2023 17:46:43 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="dc88019474eaccf49546a08619447910";
logging-data="3015283"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Omg8R2Rvufk2iclsBdeIs"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:Z6g3VYZ9c957Z6VxnP5Teem3sA0=
 by: Rich - Sun, 29 Jan 2023 17:46 UTC

Cecil Westerhof <Cecil@decebal.nl> wrote:
> Rich <rich@example.invalid> writes:
>
>> Cecil Westerhof <Cecil@decebal.nl> wrote:
>>> I have a script that I have been using for years. As far as I know I
>>> did not change it. In the part that creates the Tk stuff I do have:
>>> namespace import :::bindMultiple
>>>
>>> This gives:
>>> import pattern ":::bindMultiple" tries to import from namespace "" into itself while executing "namespace import :::bindMultiple" (file "/home/cecil/bin/teaTk.tcl" line 1)
>>> invoked from within "source ${scriptDir}/teaTk.tcl"
>>> (file "/home/cecil/bin/chooseTea.tcl" line 72)
>>>
>>> Has there changed something in tclsh?
>>> If the namespace import is wrong: what should it be?
>>>
>>
>> ::: is not a valid root namespace specifier (count the number of
>> colons).
>
> That was what I also thought. But changing it to two did not help.
> As far as I know the code has not been changed.
> It seems that it should be something like:
> namespace import PACKAGE::bindMultiple
>
> But until now I did not manage to find the correct package.
> (I must confess that I am not the most proficient searcher.)
>
> Does anyone know which package I should use?

A google search for "tcl bindMultiple" (and forcing google to not
change it to "bind multiple" returned zero hits.

Is this possibly your own custom namespace from some other bit of code
you wrote?

Re: Problem with namespace import

<87cz6x6v6c.fsf@munus.decebal.nl>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10621&group=comp.lang.tcl#10621

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Cec...@decebal.nl (Cecil Westerhof)
Newsgroups: comp.lang.tcl
Subject: Re: Problem with namespace import
Date: Sun, 29 Jan 2023 19:40:43 +0100
Organization: Decebal Computing
Lines: 56
Message-ID: <87cz6x6v6c.fsf@munus.decebal.nl>
References: <877cx590ta.fsf@munus.decebal.nl> <tr5tt9$2piqi$3@dont-email.me>
<87h6w96ycc.fsf@munus.decebal.nl> <tr6be2$2s0jj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="60aa7f12d08810dbc752c546639d8565";
logging-data="3034317"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/q+6hg8aGMpYliy6a1d0FKUXqUQNWNovQ="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:xzoegK68Zr6jruBe43aLVYzknRM=
sha1:5xqnPrhDjkXa7S9etXOF2vcVWQs=
 by: Cecil Westerhof - Sun, 29 Jan 2023 18:40 UTC

Rich <rich@example.invalid> writes:

> Cecil Westerhof <Cecil@decebal.nl> wrote:
>> Rich <rich@example.invalid> writes:
>>
>>> Cecil Westerhof <Cecil@decebal.nl> wrote:
>>>> I have a script that I have been using for years. As far as I know I
>>>> did not change it. In the part that creates the Tk stuff I do have:
>>>> namespace import :::bindMultiple
>>>>
>>>> This gives:
>>>> import pattern ":::bindMultiple" tries to import from namespace "" into itself while executing "namespace import :::bindMultiple" (file "/home/cecil/bin/teaTk.tcl" line 1)
>>>> invoked from within "source ${scriptDir}/teaTk.tcl"
>>>> (file "/home/cecil/bin/chooseTea.tcl" line 72)
>>>>
>>>> Has there changed something in tclsh?
>>>> If the namespace import is wrong: what should it be?
>>>>
>>>
>>> ::: is not a valid root namespace specifier (count the number of
>>> colons).
>>
>> That was what I also thought. But changing it to two did not help.
>> As far as I know the code has not been changed.
>> It seems that it should be something like:
>> namespace import PACKAGE::bindMultiple
>>
>> But until now I did not manage to find the correct package.
>> (I must confess that I am not the most proficient searcher.)
>>
>> Does anyone know which package I should use?
>
> A google search for "tcl bindMultiple" (and forcing google to not
> change it to "bind multiple" returned zero hits.
>
> Is this possibly your own custom namespace from some other bit of code
> you wrote?

That was the problem. I wrote a set of proc's that I find very useful.
So I needed tot do:
namespace import ::dcblUtilities::bindMultiple

The proc for people who like to know it:
proc ::dcblUtilities::bindMultiple {tag sequences script} {
foreach event ${sequences} {
bind ${tag} <${event}> ${script}
}
}

But why ::dcblUtilities::bindMultiple was changed into :::bindMultiple

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Re: Problem with namespace import

<tr6v2v$2vged$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10628&group=comp.lang.tcl#10628

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: Problem with namespace import
Date: Sun, 29 Jan 2023 23:22:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <tr6v2v$2vged$2@dont-email.me>
References: <877cx590ta.fsf@munus.decebal.nl> <tr5tt9$2piqi$3@dont-email.me> <87h6w96ycc.fsf@munus.decebal.nl> <tr6be2$2s0jj$1@dont-email.me> <87cz6x6v6c.fsf@munus.decebal.nl>
Injection-Date: Sun, 29 Jan 2023 23:22:07 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="08296d7872fb79d34cfec617b1c601c7";
logging-data="3129805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XvqjCr8fwUqJ6mRgYTSlf"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:YIK0e30jgx4exaoARnUChjX3S64=
 by: Rich - Sun, 29 Jan 2023 23:22 UTC

Cecil Westerhof <Cecil@decebal.nl> wrote:
>
> But why ::dcblUtilities::bindMultiple was changed into :::bindMultiple

That looks like a search/replace gone wrong.

Re: Problem with namespace import

<87lelk5x59.fsf@munus.decebal.nl>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10632&group=comp.lang.tcl#10632

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Cec...@decebal.nl (Cecil Westerhof)
Newsgroups: comp.lang.tcl
Subject: Re: Problem with namespace import
Date: Mon, 30 Jan 2023 07:55:46 +0100
Organization: Decebal Computing
Lines: 17
Message-ID: <87lelk5x59.fsf@munus.decebal.nl>
References: <877cx590ta.fsf@munus.decebal.nl> <tr5tt9$2piqi$3@dont-email.me>
<87h6w96ycc.fsf@munus.decebal.nl> <tr6be2$2s0jj$1@dont-email.me>
<87cz6x6v6c.fsf@munus.decebal.nl> <tr6v2v$2vged$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="38e36d0e47c1f5b2e227cf1a74a750cc";
logging-data="3356554"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Y0wIUwvVwla/FBrr4viHMyeO2wpvR0i0="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:DJKvieMvWXTdEGCnuYgH0PTLDEM=
sha1:3aSiglOLDFhq3Mlh+cMyWel/680=
 by: Cecil Westerhof - Mon, 30 Jan 2023 06:55 UTC

Rich <rich@example.invalid> writes:

> Cecil Westerhof <Cecil@decebal.nl> wrote:
>>
>> But why ::dcblUtilities::bindMultiple was changed into :::bindMultiple
>
> That looks like a search/replace gone wrong.

As far as I know I did not though that file for a long time. Maybe
there where gremlins in the house. ;-)

But problem solved. :-D

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor