jdc8 / wub

Automatically exported from code.google.com/p/wub
0 stars 0 forks source link

new function replace on Query.tcl #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For my Wub-App I must have a replace of an element in the Query.tcl

What you Think about that, or have you a other possibility?

Marc

    #20100920/mz
    # replace - replace a simulated query element
    # query - query dict generated by parse
    # el - name of element
    # val - value of element
    # metadata - metadata
    proc replace {query el val {metadata {}}} {
    if {[dict exists $query $el]} {
        dict set query $el $val
    } else {
        dict lappend query $el $val $metadata
    }
    return $query
    }

Original issue reported on code.google.com by marc.zie...@gmail.com on 18 Nov 2010 at 2:01

GoogleCodeExporter commented 9 years ago
Thanks, added to the source.

Original comment by mcc...@gmail.com on 18 Nov 2010 at 2:08