Forum OpenACS Development: Re: Major revision of the XOTcl interface to the Content Repository and to ACS objects and ACS Object Types in general

Hi Matthew,

since you did not answer my above questions, I assume that my suspicion with line-breaks in the SQL statement was right, and that the provided command returns indeed line breaks for the default values. I have altered the function to strip cr and lf from the default values. Please, get a new version of xotcl-core from cvs head and check if you experience some differences.

Just in case: the version of xowiki in openacs-5-3 works with the version of xotcl-core from that branch, and that the version of xowiki in cvs head works with the version from xotcl-core from cvs head. don't mix these.

-gustaf neumann


This is interesting. Are the defaults maybe provided (by the user) as a list using curly braces? I ran into a bug in some code of my own where I provided a nice looking list, like a list of proc args. It was essentially a name/value list. But when I tried to do a match, it didn't work. Obviously Tcl includes following newlines in some cases. The fix was to not provide such a nice list, but it looks like your idea is to strip off additional whitespace.

i doubt, that this is the same problem. xotcl-core (in cvs head) parses the default values for stored procedures from the source code of the stored procedures obtained from the PostgreSQL system catalogs. In a pure unix environment, this works fine; i would also assume it works ok in a pure windows environment. My guess was that in a mixed environment (running unix, but sourcing the crlf files) there might be a problem (null is often used as a default value, specified at the end of a line). Note that this effects only default values for stored procedures, not other default values (e.g. for non-positional arguments).

When reading crlf line terminated files in a unix environment, problems are not unlikely. In Tcl in general, input translation with "auto" translates all incoming cr, lf or crlf into a singe newline character. This should be fine. However, the SQL files are not read by Tcl, and might be a problem. But this was just a guess, no idea, if it was right.

Hi Gustaf,

Thanks for the correction uploads. I was going to try the pure unix system (away from windows) before answering those questions as your guess looked very reasonable with the extra "'s in the error message. In trying to reset my system I've crashed my laptop so am delayed by re-installation hassles and adding a linux partition (and finding a distribution that recognises my graphics card!)

Thanks for the uploads - hope to try them later today.