Forum OpenACS Development: Re: TWiST OpenACS package

Collapse
7: Re: TWiST OpenACS package (response to 5)
Posted by Claudio Pasolini on
Following Malte's suggestion and downloading your updated TWiST version I managed to install the package, even if I got another error (that I forgot to annotate).

As a result the package was created and the twist code was correctly checked out by subversion, but:

  • the package was not auto mounted on the site map
  • the links to the documentation and to the example web services were missing, even if I had set the corresponding parameters to "1" before installing
  • the parameter "sourceDirectory" was empty
I manually mounted the package, executed the proc ::twist::install::after-install to create the missing links and set the parameter "sourceDirectory" (not sure if it is necessary) and restarted the server.

Now all is working fine, but naturally only after modifying the config.tcl adding the line:

    ns_param   twsdl              tcl
to the list of Aolserver modules: perhaps you could add a simple reminder about this into the package /doc.

Thank you very much for your work on complex types and the examples provided!

Collapse
9: Re: TWiST OpenACS package (response to 7)
Posted by Tom Jackson on
There seemed to be two causes for errors:

First I tried to use parameter::set... before the package was installed. The bottom line result is that you can't access the parameter defaults in the twist.info file prior to the package being installed. I finally figured out how to use this to my advantage.

Second: a mount point like '/twist/' was rejected, I think due to the leading '/'. Changing it to 'twist' seemed fo fix the error.

Third: code in twist-init.tcl should not run until the package is installed. The installed and upgradeNow parameters default to 0 before installation, so this code doesn't run until you restart the server.

Claudio,

You should not have to modify your config.tcl file, the TWiST code is sourced by the twist-init.tcl file during startup.

If this change actually works at all, it would not be good, because the twist source should be at tcl/twist/twist-$version/. If AOLserver is finding and executing subdirectories of tcl/twist, then the next time you upgrade twist, both versions will execute. Hopefully your install is just working as expected and not because of the change to config.tcl.

If you decide to test the new package, you might need to delete the site-node created. At least once in my testing I ended up with twist-2/ as the auto-mount point.

I am still working to improve this so it is easier to install and upgrade, and follows OpenACS conventions.

So far I have these suggestions (some my own):

1. alternative download option, using http/tar.gz. Which client should I standardize on?

2. maybe move the install/callback code to other files.

3. provide some OpenACS package specific documentation.

4. make it easier to setup defaults prior to package installation.

5. examples using the OpenACS API.

6. some method for discovering or registering twist configuration files.