Forum OpenACS Q&A: How can I create customized tcl procedure?

Collapse
Posted by jay he on
I installed OpenACS 3.2.5 and tried to create some customized tcl
procedures.

I put a commonly called procedure(foo-defs.tcl) in the private tcl
directory (/web/openacs/tcl) as module-name-defs.tcl. After restart
aolserver, this tcl procedure is not sourced.

I don't what's wrong and can't find help in the documentation and faq
(version 4 has a thread but not 3.2.5). I wrote the tcl procedure in
the following format:

proc name { parameter } {
    proc content
}

What else should I do to make it work?

Thanks,

Collapse
Posted by David Walker on
Check your error log. Possibly in /usr/local/aolserver/logs/
Look for any errors in sourcing your file.

If necessary put "ns_log notice {sourcing module-name-defs.tcl}" at the top of your file and "ns_log notice {done sourcing module-name-defs.tcl}" at the bottom of your file and see that aolserver started sourcing it and finished sourcing it.
Collapse
Posted by jay he on
Thanks. David.

I checked the log and found the problem. One of the tcl procedures in that file is not in correct format.
After correction, it works fine.

Thanks again,