Forum OpenACS Development: "-" in variables names in ADP files

Collapse
Posted by Dave Bauer on
The ADP parser in OpenACS does not support the minus character in variable names. It is perfectly legal to create variables with the minus in the name in Tcl.

I have some code that creates user specificed variable names to generate forms, and in this case someone put "-" in the names.

I made a simple change to a few regular expressings in acs-templating/tcl/parse-procs.tcl and it did fix the problem.

Can anyone imagine that this might break something? I hesitate to change this since there is so much code that, not necessarily depends, but at least works just fine with the current parser behavior.

Ideas?

Collapse
Posted by Dave Bauer on
It seems that "-" is maybe not a good idea, and poor style to include operators in variable names based on my informal survey in IRC.
Hi Dave,

I had the same problem [1], but I got no answer. Can you please tell me what did you do in order to fix the problem? or send me the code?

Thanks.

Regards, Jose

[1] https://openacs.org/forums/message-view?message_id=203178

Collapse
Posted by Jade Rubick on
Jose, I answered your question in the other thread :)
Collapse
Posted by Dave Bauer on
I think your best solution is to NOT use the hyphen/minus in variables names. It is pretty clear that finding an alternative is the preferred solution and I am not planning on making any changes to the OpenACS core.