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

Gustaf,

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.