[Xotcl] Namespaces and Xotcl
Shishir Ramam
sramam at gmail.com
Sun Oct 29 02:54:04 CET 2006
Hi,
Was wondering why it's not possible to import namespaces when XOTcl objects
are involved.
The shortest example that I could rustle up is included below.
Help in understanding what prevents this from working is much appreciated.
-shishir
% package require XOTcl
1.4.0
% namespace eval ::my::test {
namespace import ::xotcl::*
Class Foo
Foo instproc bar {} {
puts " foo bar is a very tasty!"
}
}
% ::my::test::Foo foo
::foo
% foo bar
foo bar is a very tasty!
% ::my::test::Foo info instances
::foo
% # Why doesn't the following work?
% namespace import ::my::test::*
% Foo foo2
invalid command name "Foo"
% ::my::test::Foo info instances
::foo
% Foo info instances
invalid command name "Foo"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://alice.wu-wien.ac.at/pipermail/xotcl/attachments/20061028/b7c0e95c/attachment.html
More information about the Xotcl
mailing list