On 04/24/2013 02:01 PM, Harald Oehlmann wrote:
> 
> Well, my baby ;-)
> I just fixed bugs and security holes...
> 

the same for me about Rivet, still I consider it my baby after almost 6
years...

> I like dictionaries everywhere so I am in favour to that.
> 
> Personally, I would prefer with a new start featuring:
> - a new load_variables which returns a dict and handles lists and
> scalars in  a more beautiful way. I don't like the "__X"-members to
> indicate "X" be a list.

you mean a replacement for 'load_response'? If it's a different name we
may well introduce a new Tcl command and call it load_variables (also
load_qs,load_post,load_all would be good, reproducing in the naming the
same difference var_qs,var_post and var have for single parameters)

> - A rewrite of form2 which uses dicts everywhere and does not require
> incrtcl. The use of dicts will simplify all places where are arrays used
> so far...
> 

argh, you're killing me on this, I developed an affection over Itcl
after all these years. I'm kidding, I did very good projects based on
Itcl, but it's OK if we move on to TclOO. Do you have something
different in mind?

> If a "dict-parameter way" is added, this adds an additional redundant
> parameter interface.
> 
> What is the definition ?
> 
> select wn -labels {L1 L2 L3} -values {V1 V2 V3}
> 
> will use dict:
> 
> set dP [dict create\
>       -labels {L1 L2 L3} \
>       -values {V1 V2 V3} ]
> 

 when several select are in a form it's disturbing that you have to
carry around several lists suggesting their association following
conventions in the naming while you could just enforce the mapping
value->label in a single dictionary.

I have select inputs whose data are built from queries to a database.
In the whole picture it would be nice if also the database interface
could be able to return a dictionary. It doesn't change the basic facts
about form, just provides a nice interface for passing parameters by
value in a single object while keeping coherent the way they're handled
in the code

select wn \
 -dictionary [$dbobj dictionary "select key,value from table where..."]

> and will be called:
> 
> select wn -dictionary $dP
> 
> which will be equivalent to:
> 
> select wn {*}$dP
> 

-- 
-- Massimo Manghi

Dipartimento di Neuroscienze
Unità di Biofisica e Fisica Sanitaria
via Volturno 39
43125 Parma

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to