Forum OpenACS Q&A: tcl namespace wierdness

Collapse
Posted by Mark Aufflick on
I am guessing that it is because ad_proc messes with namespaces somehow, but if I try eg:

namespace eval foo {
    namespace export bar
}
ad_proc foo::bar {} { return "foobar" }

and then in a web page.tcl:

namespace import foo::*
set fb [bar]
then I get a invalid command name "bar" error.

has anyone succesfully used the tcl import mechanism in openacs?