<i>lassign to member variables in itcl methods</i> status still Open with 5 other changes
by
.
D 2003-11-20T23:50:10
J icomment Logged\sIn:\sYES\s\nuser_id=148712\n\nEril\sAllaert\sreports\sin\sclt\s(verified\swith\s8.4.4):\nTry\sthe\sfollowing\sscript,\susing\stclsh:\n\n\s\spackage\srequire\sItcl\n\s\spackage\srequire\sTclx\n\n\s\sitcl::class\sTest\s{\n\s\s\s\s\s\svariable\sx\s0\n\s\s\s\s\s\svariable\sy\s0\n\n\s\s\s\s\s\sconstructor\s{args}\s{\n\s\s\s\s\s\s\s\s\s\sprep;\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s#\sthis\sshould\smodify\sx\sand\sy\s...\n\s\s\s\s\s\s\s\s\s\sputs\s"$x\s[incr\sy]";\s\s#\s...\swhich\sshould\sbe\nnoticeable\shere\n\s\s\s\s\s\s}\n\s\s\s\s\s\smethod\sprep\s{}\s{\n\s\s\s\s\s\s\s\s\s\sloop\sx\s1\s3\s{puts\s"$x\s[incr\sy]"}\n\s\s\s\s\s\s\s\s\s\sputs\s"local\svars:\s>[info\slocals]<"\n\s\s\s\s\s\s}\n\s\s}\n\n\s\sTest\st\n\nExpected\soutput:\s4\slines\scontaining\sresp\s"1\s1",\s"2\s2",\n"local\svars:\s><"\nand\s"3\s3".\sYou\sget\sexactly\sthat\swith\sTcl\s8.3.4,\s[incr\sTcl]\n3.2\sand\nTclX\s8.3.5.\sBut\swith\sTcl\s8.4.3,\siTcl\s3.3\sand\sTclX\s8.4\sthe\nlast\sline\nis\s"0\s3",\sand\sthe\sone\sbefore\s"local\svars:\s>x<".\sSame\sif\sTcl\nis\supgraded\nto\sTcl\s8.4.4.\n\nReplacing\sTclX's\sloop\scommand\sin\sthe\smethod\sprep\sby\sany\sof\nthe\s17\sother\nTclX\scommands\sthat\srequire\sa\svariable\sname\sas\sargument\ndemonstrates\sthe\nsame\sproblem.\sThe\swork-around\sto\sget\sthis\sworking\sagain\sas\nexpected\sis\nto\shave\sat\sleast\sone\sstandard\sTcl\scommand\sreferring\sto\sthis\nvariable\n(e.g.\s"set\sx")\sanywhere\swithin\sthis\sprep\smethod.\sThis\swas\nreported\sas\nbug\s835020\son\sSF,\sbut\sinitially\smentioned\sonly\sTclX's\n"lassign"\scommand.\n\n
J login msofer
J mimetype text/plain
J priority 8
J username msofer
K 835020ffffffffffffffffffffffffffffffffff
U msofer
Z a4ea301e3b8f9ad4e556dffee68a4dba