No registered users in community xowiki
in last 10 minutes
in last 10 minutes
Re: [Xotcl] Class naming and creation
From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Tue, 22 Nov 2005 15:08:46 +0100
Zoran, does this help? it will print
::xotcl::Class wants to create Foo
::Foo wants to create ::xotcl::__#1
::Foo wants to create bar
You can do this also selectively for certain classes via mixins, or by
defining
an appropriate metaclass.
Greetings,
-gustaf
-----------------------------------------------------------------------------------------------------
Class instmixin add [Class new -instproc create {object args} {
puts "[self] wants to create $object"
next
}]
Class Foo
Foo new
Foo bar
Date: Tue, 22 Nov 2005 15:08:46 +0100
Zoran, does this help? it will print
::xotcl::Class wants to create Foo
::Foo wants to create ::xotcl::__#1
::Foo wants to create bar
You can do this also selectively for certain classes via mixins, or by
defining
an appropriate metaclass.
Greetings,
-gustaf
-----------------------------------------------------------------------------------------------------
Class instmixin add [Class new -instproc create {object args} {
puts "[self] wants to create $object"
next
}]
Class Foo
Foo new
Foo bar