Home
The Toolkit for Online Communities
17128 Community Members, 1 member online, 1922 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : export_vars and (form)vars containing colons : One Message

Forum OpenACS Development: Re: export_vars and (form)vars containing colons

Collapse
Posted by Lars Pind on
Ola,

I ran across this myself a short while ago when I did the changes to the form builder.

The problem is that export_vars lets you define types for your variables, akin to ad_page_contract, such as:

[export_vars { bug:array checked:multiple }]

So it splits on the colon.

The fix I did then was to allow you to escape colons, like thisÆ

[export_vars { form\:id form\:mode }]

You'll find this syntax present in acs-templating/tcl/form-procs.tcl.

This isn't the prettiest of solutions. Perhaps another solution would be to have a switch that says "-nosomething" which lets you turn off the :-interpretation alltogether.

Alternatively, we could change the form builder's habit of using :'s in variable names, replace them with dots, for example, since the form builder is the only piece of code that uses those colons, and it's nice to have the symmetri between ad_page_contract and export_vars.

Any other suggestions?

/Lars