Forum OpenACS Development: Re: category map object

Collapse
4: Re: category map object (response to 3)
Posted by Dave Bauer on
You want to review how Tcl works http://philip.greenspun.com/tcl/

The answer is simple, there are many examples around the toolkit of dynamic variable names.

[set cat_${category_id}] will return the value of the variable you are looking for.

$cat_${category_id} is parsed as $cat_ $category_id since the parser does not do to passes.

NOTE that the index of an array is evaluated betfore the variable reference so $cat($category_id) will work where $cat_${category_id} will not.

Collapse
5: Re: category map object (response to 4)
Posted by Iuri Sampaio on
Thanks dave,

i tried to "read the manual" but it ended up i was just browsing the whole site looking for examples because i didn't know how do precisely call the problem i had in order to focus my research.

best wishes