:(tclStubsPtr->tcl_GetCurrentNamespace)(interp)->fullName<::> :ns->fullName<::tclmsgque::MkKernel>namespace current = ::test
Hi, I have a problem that a "package require ?" always be done into
the global (::) namespace. I have a problem to setup a "namespace"
from required package to be "::test::tclmsgque::MkKernel" and *not* "::tclmsgque::MkKernel"
tcl code:
namespace eval test {
aotto1968 <aotto1968@t-online.de> wrote:
Hi, I have a problem that a "package require ?" always be done into
the global (::) namespace. I have a problem to setup a "namespace"
from required package to be "::test::tclmsgque::MkKernel" and *not*
"::tclmsgque::MkKernel"
Do you mean you always want your "test" namespace to be created in the
global top-level namespace?
tcl code:
namespace eval test {
If you want "test" to always be in the global, then ask for that:
namespace eval ::test {
Now 'test' will always be in the global namespace, no matter in what namespace you run the package require.
On 23.05.22 16:06, Rich wrote:
aotto1968 <aotto1968@t-online.de> wrote:
Hi, I have a problem that a "package require ?" always be done into
the global (::) namespace. I have a problem to setup a "namespace"
from required package to be "::test::tclmsgque::MkKernel" and *not*
"::tclmsgque::MkKernel"
Do you mean you always want your "test" namespace to be created in the
global top-level namespace?
tcl code:
namespace eval test {
If you want "test" to always be in the global, then ask for that:
namespace eval ::test {
Now 'test' will always be in the global namespace, no matter in what
namespace you run the package require.
I want to have that the "tclmsgque" namespace be created into the
namespace the "package require" was called (now "test"). the "test"
namespace is just an "test-example"
I want to have that the "tclmsgque" namespace be created into the
namespace the "package require" was called (now "test"). the "test" namespace is just an "test-example"
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 29:36:56 |
Calls: | 6,669 |
Calls today: | 1 |
Files: | 12,216 |
Messages: | 5,338,039 |