Opened 14 years ago
Closed 13 years ago
#1200 closed defect (fixed)
Tcl function: TclList2SetOfText
Reported by: | Pedro Gea | Owned by: | Jorge |
---|---|---|---|
Priority: | normal | Milestone: | Mantainance |
Component: | Interface | Version: | head |
Severity: | normal | Keywords: | |
Cc: |
Description
La función Tcl TclList2SetOfText
no funciona adecuadamente si los textos tienen comillas en su interior:
Set Eval(Tcl_Eval(" TclList2SetOfText [list {un texto} {otro texto \"distinto\"}] ")[1]); // ERROR: [3] Argumento distinto fuera de lugar. Símbolo fuera de // lugar. en el carácter 42, línea 1: // > SetOfText("un texto","otro texto "distinto"") // ^
Se propone una alternativa a la función implementada en: tolinspe.tcl línea 2129:
proc TclList2SetOfText { lst } { set result [ list ] foreach i $lst { lappend result \"[string map {\" \\\"} $i]\" } return "SetOfText([join $result ,])" }
Change History (3)
comment:1 Changed 13 years ago by
Status: | new → accepted |
---|
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note: See
TracTickets for help on using
tickets.
Hay que tener cuidado pues si aparece la secuencia \" en la cadena entonces el resultado es inválido.