Hi, Im having troubles with the manage of arrays in ad_form.
Im declaring elements with a for like this
set elements [list]
for {set i 1} {$i <= 5} {incr i} {
set element [list bullet.$j:text(text),optional \
{label "Bullet $j"} \
{html { size 60 }} \
{before_html "<ul><li>" } \
{after_html "</ul>"} \
{value $def}]
lappend elements [list $element]
}
and that works just fine but, when I try to make a list of the bullets to send them to a procedure that inserts the list in the data base, I can't.
Im trying to do something like this
set bullet_list [list]
for {set i 1} {$i <= $array_max} {incr i} {
if { ![empty_string_p $bullet($i) ] } {
lappend bullet_list $bullet($i)
}
}
and the error I get is:
can't read "bullet(1)": no such variable
while executing
"empty_string_p $bullet($i) "
Any help, from someone