Skip to content
Tcl Source Code Artifact [e4f32f878b]
Login

Artifact [e4f32f878b]

Artifact e4f32f878bcd2c8db77eb1b701a8eae1b1496f05ce33705621ff0e4ecb0d1855:

Ticket change [e4f32f878b] - Ticket [ce6b428620dd89bc|ce6b428620] <i>&lt;&lt;Increment&gt;&gt; event is endlessly triggered once messagebox closes</i> status still Open with 4 other changes by fvogel on 2022-02-18 21:20:20.
D 2022-02-18T21:20:20.271
J icomment The\sproblem\sis\sdue\sto\sthe\sfollowing.\sWhen\sclicking\sthe\sup\sarrow\sof\sthe\sspinbox,\san\s<<Increment>>\svirtual\sevent\sis\sgenerated\sfrom\sttk::spinbox::Press.\sThis\sevent\sis\srepeatedly\sgenerated:\r\n\r\n<code>ttk::Repeatedly\sevent\sgenerate\s$w\s<<Increment>></code>\r\n\r\nttk::Repeatedly\sruns\sits\sprovided\sscript\s(<code>event\sgenerate\s$w\s<<Increment>></code>)\sand\safter\sthis\sscript\sreturns\sschedules\sa\srepeated\srun\sof\sthis\ssame\sscript.\sThe\sorder\sof\swhat\sis\shappening\shere\sis\simportant.\r\n\r\nThis\sre-scheduling\srepeats\suntil\sthe\sup\sarrow\sbutton\sis\sreleased\s(mouse\sbutton\sup),\sat\swhich\stime\sttk::spinbox::Release\sgets\scalled,\swhich\scalls\sttk::CancelRepeat\sto,\swell...\scancel\sthe\srepeat!\r\n\r\nThis\simplementation\sallows\sto\sincrement\srepeatedly\sthe\sspinbox\svalue\sby\spressing\sand\smaintaining\sthe\sup\sarrow\sdown.\sIncrementation\sstarts\swhen\spushing\sdown\sthe\smouse\sbutton\son\sthe\sup\sarrow,\sand\sit\sstops\swhen\sreleasing\sthe\smouse\sbutton.\r\n\r\nNow,\swith\sthis\simplementation,\swhen\sthe\sscript\sbound\sto\s<code>event\sgenerate\s$w\s<<Increment>></code>\sincludes\sinstructions\sthat\sallow\sthe\sevent\sloop\sto\srun\sbefore\sthe\sscript\sreturns,\sthe\sttk::CancelRepeat\scall\sfrom\sthe\smouse\sbutton\srelease\swill\srun\sfrom\sinside\sthe\sbound\sscript\sinstead\sof\safter\sthis\sscript\shas\sfinished.\sSince\sthe\sRepeat(timer)\svalue\sthat\sis\sused\sto\sidentify\swhat\sneeds\sto\sbe\scancelled\sis\sonly\sset\sAFTER\sthe\sreturn\sof\sthe\sbound\sscript,\sthe\scancel\scall\swill\shave\sno\seffect.\r\n\r\nThe\sfix\stherefore\sis\sto\sswap\sthe\sorder\sof\sscript\sexecution\sand\srepetition\sscheduling,\ssee\s[fb9a363237].
J login fvogel
J mimetype text/x-fossil-wiki
J resolution Fixed
K ce6b428620dd89bc46786654e3aa1d62d74d3fc8
U fvogel
Z a1369edc10aa3ce4b2fbc28891f746bd