Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Love may fail, but courtesy will previal." -- A Kurt Vonnegut fan


devel / comp.lang.tcl / nsf::nx strange behavior

SubjectAuthor
o nsf::nx strange behaviorManfred Stelzhammer

1
nsf::nx strange behavior

<uh114f$1s858$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: manf...@antispam.at (Manfred Stelzhammer)
Newsgroups: comp.lang.tcl
Subject: nsf::nx strange behavior
Date: Sat, 21 Oct 2023 19:18:07 +0200
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <uh114f$1s858$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 21 Oct 2023 17:18:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="da5654ed585c7d86f6e08b2e230473a2";
logging-data="1974440"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LkJd5dnMei1H+T5ceqn4/8KoASn8n43w="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:vchrGJrGNLWeyRcX8vffMiWKIDE=
Content-Language: de-AT-frami
 by: Manfred Stelzhammer - Sat, 21 Oct 2023 17:18 UTC

Hi

I tried out a small script:

##
package require nx

nx::Class create C {
:property new:required
:method init {} {
::C::D ${:new}
}
} nx::Class create C::D {
:public object method unknown {a} {
puts "TEXT1 : I'll create object $a"
:create $a
}
:method init {} {
puts "TEXT2 : I am object [self] from class [:info class]"
}
}

##

My 1st try is:

C create c -new widanix

The output is:

TEXT1 : I'll create object widanix
TEXT2 : I am object ::C::widanix from class ::C::D
::c

TEXT1 says the created object is "widanix"
TEXT2 says the created object is "::C::widanix"

Why the differenc, why is widanix a child from Class C ?
##

My 2nd try is:

C::D widanix

The same output like 1st

My 3rd try is:

C create c -new ::widanix

TEXT1 : I'll create object ::widanix
TEXT2 : I am object ::widanix from class ::C::D
::c

This is the output I expected by try 1 as well.

My 4th try is:

C::D ::widanix

Ther is the same output like the 3rd try.

Why thid different behavior

regards

Manfred

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor