Skip to content
Tcl Source Code Artifact [1f325b2ba6]
Login

Artifact [1f325b2ba6]

Artifact 1f325b2ba6e0534a15b257016a4c2b572e9d9fda:

Ticket change [1f325b2ba6] - New ticket [218312ffffffffff|218312ffff] <i>Tcl fails to generate visible errors under certain condition</i>. by nobody on 2000-10-26 00:56:00.
D 2000-10-26T00:56:00
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3738\sBug\nVersion:\s8.0p2\nSubmitDate:\s'1999-12-01'\nLastModified:\s'1999-12-03'\nSeverity:\sSER\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sSolaris\nOSVersion:\s2.6\nMachine:\sSun\sSparc\s1000,\sWindows\s95\srunning\sthe\sX-Windows\semulator\sXoftwa\nFixedDate:\s'2000-10-25'\nClosedDate:\s'1999-12-03'\n\n\nName:\sMark\sA.\sWege\n\nComments:\nThis\salso\shappens\susing\sTcl\s7.4/Tk\s4.0\son\sUnix,\sas\swell\sas\sTcl\s8.0.3\son\sWindows\s95.\n\nWhile\swriting\sthe\stest\sscript\sabove,\sI\salso\snoticed\sthat\sTcl\sfailed\sto\sinform\nme\sof\san\serror\swhen\sI\sdefined\sthe\scheckvalue\sprocedure\swithout\sproviding\sthe\n3\sarguments\srequired\sby\sthe\strace\scommand.\n\nReproducibleScript:\nThe\sfollowing\sscript\sis\spart\sof\ssome\scode\swe\suse\sto\svalidate\sdata\sthat\sthe\suser\ntypes\sinto\sentry\swidgets;\sthis\sis\sdone\sby\splacing\straces\son\sthe\sentry\swidget's\ntextvariable.\s\sTo\stest\sthis,\seither\sexecute\swish\sinteractively\sand\spaste\sthis\ncode\sinto\sthe\ssession,\sor\splace\sthe\scode\sinto\sa\sfile\sand\sthen\sexecute\swish\swith\nthe\sfile\sas\sa\sparameter:\n\nproc\scheckvalue\s{args}\s{\n\s\s\sglobal\se\n\s\s\sif\s{[string\slength\s$e]\s==\s5}\s{\n\s\s\s\s\s\safter\s500\s{set\se\s""}\n\s\s\s\s\s\sputs\s"\\nAbout\sto\sgenerate\sthe\serror\s(undefined\svariable\s\\"test\\")"\n\s\s\s\s\s\sputs\s"test\s=\s$test"\n\s\s\s\s\s\sputs\s"after\sundefined\svariable"\n\s\s\s}\selse\s{\n\s\s\s\s\s\sputs\s"e\s=\s$e"\n\s\s\s}\n}\nlabel\s.l\s-text\s"Enter\s5\scharacters\sto\sgenerate\san\serror"\nentry\s.e\s-textvariable\se\s-width\s10\nbutton\s.b\s-width\s10\s-text\s"Enter\sChar"\s-command\s{append\se\sc}\nbutton\s.c\s-width\s10\s-text\s"Close"\s-command\sexit\npack\s.l\s.e\npack\s.b\s.c\s-side\sleft\s-expand\syes\nfocus\s.e\ntrace\svariable\se\sw\scheckvalue\n\nObservedBehavior:\nThe\strace\sprocedure\s(checkvalue)\sis\swritten\ssuch\sthat\sthe\scode\sattempts\sto\ndisplay\sthe\scurrent\svalue\sfor\san\sundefined\svariable\swhen\sthe\sentry\swidget\ncontains\s5\scharacters.\s\sThis\sshould\sgenerate\san\serror,\sbut\sdoesn't\salways.\nIf\syou\senter\s5\scharacters\smanually,\smy\sfirst\sdebug\sstatement\sis\sdisplayed\sand\nthe\strace\sprocedure\saborts,\sbut\sno\serror\sis\sdisplayed,\seither\sin\smy\sxterm\nwindow\sor\sin\sa\spopup\swindow.\s\sIf\syou\senter\s5\scharacters\sby\sclicking\son\sthe\n"Enter\sChar"\sbutton\s5\stimes,\sa\spopup\swindow\scontaining\sthe\serror\sis\sdisplayed.\n\nDesiredBehavior:\nTcl\sshould\sprovide\ssome\svisual\sindication\sthat\san\serror\shas\soccurred,\seither\nby\swriting\sthe\serror\sto\sstdout\s(when\srunning\sinteractively),\sor\sby\sdisplaying\nthe\serror\sin\sa\spopup\swindow\s(using\stkerror/bgerror).\n\n\n\nThis\sis\sby\sdesign.\s\sThe\slatter\sfails\sas\sexpected,\sbecause\sit\noccurs\svia\sthe\s'append'\scommand.\s\sHowever,\sthe\sformer\sis\striggered\nthrough\sthe\stextvar\stracing\sproc\sin\sthe\sentry\swidget,\swhich\nignores\serrors.\sThe\suser\scan\sspecifically\sdo\s'error'\sif\sthey\swant.\s\n--\s12/03/1999\shobbs
J foundin obsolete:\s8.0p2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title Tcl\sfails\sto\sgenerate\svisible\serrors\sunder\scertain\scondition
J type Bug
K 218312ffffffffffffffffffffffffffffffffff
U nobody
Z 47965a28ea5157867274812ac5867913