Tk Source Code

Artifact [864d586c]
Login

Artifact 864d586caf13a155194086e93a965eba2c2482bf:

Ticket change [864d586c] - Ticket [1581435f] menu index wrong if label is an integer status still Open with 9 other changes by fvogel 2015-09-02 20:32:45.
D 2015-09-02T20:32:45.646
J assignee fvogel
J closer nobody
J comment If\sa\smenu\scontains\san\sitem\swhose\slabel\sis\san\sinteger,\r\nthen\smenu\sindex\sreturns\sthe\svalue\sof\sthat\smenu\sitem,\r\nor\sif\sthe\sinteger\sis\stoo\slarge,\sthen\sit\sreturns\r\nthe\sindex\sof\sthe\slast\sitem\sin\sthe\smenu.\r\n\r\nHere\sis\sa\sprocedure\sto\ssee\sthis.\r\nEnter\sit\sinto\swish\sand\sselect\smenu\sitems\sto\ssee\sthe\sindex.\r\nThe\sindex\sof\sentry\s"3"\sis\sreported\sas\s3,\sbut\sshould\sbe\s1.\r\n\r\nmenubutton\s.mb\s-m\s.mb.menu\s-text\stestmenu\r\npack\s.mb\r\nset\sm\s[menu\s.mb.menu]\r\n$m\sadd\scommand\s-label\sfoo\s-command\s{puts\s"foo:\s[$m\sindex\sfoo]"}\r\n$m\sadd\scommand\s-label\s3\s-command\s{puts\s"3:\s[$m\sindex\s3]"}\r\n$m\sadd\scommand\s-label\s3a\s-command\s{puts\s"3:\s[$m\sindex\s3a]"}\r\n$m\sadd\scommand\s-label\sbar\s-command\s{puts\s"bar:\s[$m\sindex\sbar]"}\r\n$m\sadd\scommand\s-label\sbaz\s-command\s{puts\s"baz:\s[$m\sindex\sbaz]"}\r\n\r\nI\ssaw\sthis\son\sActiveState\sAqua\sTcl/Tk\s8.4.13\son\sMacOS\sX\s10.4.7.\sI\shave\s\r\nnot\stried\sto\sduplicate\sit\son\sother\soperating\ssystems\snor\swith\s8.4.14\s\r\n(since\sthe\sActiveState\sversion\sis\snot\syet\savailable).
J icomment Proposal\sfor\sa\sfix\sin\sthe\sdocumentation\sin\sbranch\sbug-1581435fff\r\n\r\nA\stest\scase\shas\salso\sbeen\saugmented\sto\scheck\sthe\sprecedence\sorder\sin\sthe\smatching\sprocess\sof\sthe\sindex\sstring.
J login fvogel
J mimetype text/plain
J priority 6
J resolution Fixed
J severity Minor
K 1581435fffffffffffffffffffffffffffffffff
U fvogel
Z b0b143f3228a7f0af87e4d232abbd78e