Forum OpenACS Q&A: Response to Translation of vars within string

Collapse
Posted by MaineBob OConnor on

David, it was my typo (in the stuffed var names and yes,

[subst $y]
does work, thanks Don. I was testing this in a proc in /tcl and this process is slow because aolserver must be restarted each time.

I was also thinking that giving users access to vars was perhaps a bad idea. It seems like undefined vars don't throw an error if in a /tcl/ proc. But Michael has made a *most* convincing security argument. String maps look like a great solution and maybe I'll use something other than a $... In another thread Jerry Asher suggested this format ::name::. I was thinking maybe [name] would work as something simple... that would be [name] in the string map. That's one backslash depending on how you see this message!

-Bob