Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
COMP.LANG.TCL
nsf::nx strange behavior
From
Manfred Stelzhammer
@21:1/5 to
All
on Sat Oct 21 19:18:07 2023
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
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
Recent Visitors
Furryboy
Sat Jun 6 10:56:29 2026
from
Romania, Galati
via
SSH
Centurion
Fri Jun 5 22:28:01 2026
from
Berea, Ohio
via
Telnet
Ab Cadd
Fri Jun 5 17:52:51 2026
from
Sheboygan, Wi
via
Telnet
Gwylbert
Fri Jun 5 06:28:52 2026
from
Sydney, Nsw
via
Telnet
Centurion
Thu Jun 4 23:42:23 2026
from
Berea, Ohio
via
Telnet
Michal Wronka
Thu Jun 4 23:19:58 2026
from
Wroclaw, Poland
via
Telnet
Michal Wronka
Thu Jun 4 23:17:20 2026
from
Wroclaw, Poland
via
SSH
Michal Wronka
Thu Jun 4 23:13:51 2026
from
Wroclaw, Poland
via
SSH
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
714
Nodes:
16 (
2
/
14
)
Uptime:
141:39:29
Calls:
12,088
Calls today:
1
Files:
14,998
Messages:
6,517,448