Page 1 of 1

[GiDlist] Becames an empty array

Posted: Tue Jan 17, 2006 4:10 pm
by ascosta at portugalmail.pt
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060117/d15c4f41/attachment.txt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060117/d15c4f41/attachment.htm

[GiDlist] Becames an empty array

Posted: Tue Jan 17, 2006 5:37 pm
by escolano
You must declare this variable array 'ProblemTypePriv' as global for this procedure
global ProblemTypePriv

----- Original Message -----
From: ascosta at portugalmail.pt
To: gidlist at gid.cimne.upc.es
Sent: Tuesday, January 17, 2006 3:27 PM
Subject: [GiDlist] Becames an empty array


Hi GID team!

I have this procedure.

proc FunctionAdd2 { wtext parent} {
global inum

set resauxp [.central.s info conditions PointLoad mesh]
if {$resauxp != ""} {

set ProbemTypePriv(pointassign) ""
#lappend ProbemTypePriv(pointassign) ""

foreach i $resauxp {
set point [lindex $i 15]
$wtext insert end $point
if {$inum!= 1} {
if {[lsearch $ProblemTypePriv(pointassign) $point] == -1} {
lappend ProblemTypePriv(pointassign) $point
}
incr inum
} else {
lappend ProblemTypePriv(pointassign) $point
incr inum
}
}
}



But i have one problem, everytime this procedure is called,
set ProbemTypePriv(pointassign) ""
doesn't works. This variable don't became empty.

Can you help me to solve this?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060117/7c7e0a2c/attachment.htm

[GiDlist] Becames an empty array

Posted: Tue Jan 17, 2006 7:09 pm
by ascosta at portugalmail.pt
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060117/2be2a816/attachment.txt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060117/2be2a816/attachment.htm

[GiDlist] Becames an empty array

Posted: Tue Jan 17, 2006 7:09 pm
by ascosta at portugalmail.pt
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060117/d2a0580f/attachment.txt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20060117/d2a0580f/attachment.htm