Forum OpenACS Development: Re: Intrigued by a Tcl variable scope

Collapse
Posted by Iuri Sampaio on
Thanks Gustaf,

It turned out that I change the approach and wrote another script. I've added a form, and the variable is within a hidden input. Instead of an argument in the link, which now is the submit form button and holds another id.

I guess those 3 lines below explain much better what I've written above.

 <form method="post" name="request_proposal" action="request-proposal-2" >
       <input type="hidden" name="product_id" id="product_id" value="@product_id;noquote@" >
       <include src="/packages/evex-event/lib/events" >
...

Collapse
Posted by Iuri Sampaio on
Thanks again Gustaf,
I've got another scenario to use list::create -pass_properties.
It works very well.

...
list::create \
-name events \
-multirow events \
-pass_properties { admin_p } \
...

Collapse
Posted by Iuri Sampaio on
Gustaf,

Instead of list::create, wouldn't the best place be in the db_multirow?

Or even, the switch pass_properties could be in both. Couldn't it?

Collapse
Posted by Gustaf Neumann on
The flag is especially for variables used in the list template, which are NOT part of the multirow (or db_multirow). The template::list iterates of the multirow tuples and needs the information, what other variables have to be provided in the "display_template".

Without looking at the details, it might be possible to modify the implementation of "display_template" to include all global variables, but - maybe for a good reason - this was not done at the first place.