def setup
form_params = driver.params
@call_params = Hash.new
for name, value in form_params
if (name =~ /^(\S+)\.(\d+)$/) then
component_name = $1
call_index = $2.to_i
@call_params[component_name] = Hash.new unless (@call_params.include? component_name)
@call_params[component_name][call_index] = value
end
end
@call_range = Hash.new
for name, value in form_params
if (name =~ /^call-range:(\S+)$/) then
control_name = $1
if (value =~ /^(\d+)-(\d+)$/) then
call_first = $1.to_i
call_last = $2.to_i
@call_range[control_name] = Range.new(call_first, call_last)
end
end
end
super
nil
end