Yes, I know the "normal" way. I don't want the normal way in this instance because I need the definition of the proc to change based on certain circumstances.
What I need is a proc that returns a list of values. The list of values changes day to day. I want the list of values to come from a backend database. I want the proc to be defined dynamically at startup to return that list of values. I don't want to have to connect to the backend database each time I need the list of values - I just want to connect one time at system startup, get the list of values, and have that list of values "hard-coded" in the proc.
This is easy to do. In fact, I've tested it outside of OpenACS and it works just fine (TCL is made to do stuff like this). It just doesn't work in OpenACS for some reason.
Is there some reason why this sort of definition is not possible in OpenACS or AOLServer?