Forum OpenACS Development: Re: Another possible bug: watched proc files don't get loaded

there's a special wrinkle here btw. The proc involved is scheduled with ad_schedule_proc, and I'm given to understand that's a special case. In any case... Ryan Gallimore let me in on a trick: go to developer support shell, and do:

ns_eval [source "[acs_root_dir]/packages/the-package/tcl/the-file-procs.tcl"]

to reload the relevent proc, then you have to make sure it's scheduled. when openacs starts, it reads all packages/*/tcl/*-procs.tcl first -- among other things, you get the tcl library during this phase -- then it reads all packages/*/tcl/*-init.tcl files (so, the inits have the benefit of having all the procs in the entire system loaded). Find what file the scheduling code is in (ad_schedule_proc secs block) and load that file:

ns_eval [source "[acs_root_dir]/packages/the-package/tcl/maybe-different-named-file-init.tcl"]

and this should save you having to restart.

-Jim

Jim, this isn't a bug, but the way ad_schedule_proc evaluates its proc argument. ns_eval'ing the -init file (the tcl file scheduling the proc) is just a shortcut to avoid restarting the server.