Artifacts Associated With Ticket 4ef142a41aa53e6a
Ticket change [9b15c25b2a] (rid 165279) by bll on 2018-09-03 17:55:16:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
References: http://core.tcl.tk/tk/info/4e2d985d4a73aa3f https://groups.google.com/d/topic/comp.lang.tcl/5Gyb2fPy4lo/discussion The if statement syntax: $cb instate disabled { return } does not always work. This is found in the ttk library code. I don't know if this style should be supported or not. If not, this ticket could be closed, and the changes outlined in the Tk ticket can be made. - foundin initialized to: "8.6.8"
- is_private initialized to: "0"
- login: "bll"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "bll"
- subsystem initialized to: "69. Other"
- title initialized to: "Tcl odd if statement syntax doesn't always work."
- type initialized to: "Bug"
Ticket change [61a65a3eff] (rid 165280) by dkf on 2018-09-03 19:57:20:
- icomment:
The implementation is <a href="/tk/artifact/f14f118a557459f1?ln=724,749">here</a>. How does it not work?
- login: "dkf"
- mimetype: "text/html"
- username: "dkf"
- icomment:
Ticket change [d1ba1c9c47] (rid 165281) by bll on 2018-09-03 20:17:43:
- icomment:
I don't think the instate command is failing, I think it is the "expr {return}" that is not (sometimes) working. I have a wrapper around a ttk::combobox. In the ttk::combobox code, the 'Post' procedure, the following statement with the return works for a normal ttk::combobox: puts "AAA:[$cb cget -state] / [$cb instate disabled]" puts "BBB:[$cb state] / [$cb instate disabled]" $cb instate disabled { return } puts " post" Output when using my wrapper: AAA:disabled / 1 BBB:disabled hover / 1 post If I change it to: if { [$cb instate disabled] } { return } it does work. - login: "bll"
- mimetype: "text/plain"
- icomment:
Ticket change [b4e63bd1b2] (rid 165282) by bll on 2018-09-03 20:41:52:
- icomment:
Ok, I thought it was some weird syntax, and I have been notified that it is actually part of the instate command. Since I have a wrapper around ttk::combobox, could it be return-ing to the wrong level???
- login: "bll"
- mimetype: "text/plain"
- icomment:
Ticket change [2653752955] (rid 165283) by oehhar on 2018-09-04 09:29:27:
- closedate changed to: "2458365.89545471"
- closer changed to: "oehhar"
- icomment:
As it is apparently an issue of the TK "instate" command, it should be discussed there. Here is the Tk ticket: [http://core.tcl.tk/tk/info/4e2d985d4a73aa3f] Closed here.
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Rejected"
- status changed to: "Closed"
- username: "oehhar"
Ticket change [8ac76f6584] (rid 165289) by bll on 2018-09-04 14:31:58:
- closedate changed to: "2458366.10554317"
- closer changed to: "bll"
- icomment:
More of a problem of uplevel not processing return statements correctly.
- login: "bll"
- mimetype: "text/plain"
Ticket change [7548ae41cb] (rid 165305) by dgp on 2018-09-04 17:28:16:
- closedate changed to: "2458366.2279684"
- closer changed to: "dgp"
- icomment:
Please note that [uplevel] controls the substitution and resolution context of a script evaluation. It does not change the actual recursion level of the active stack. Hence it has no impact on how TCL_RETURN is processed.
- login: "dgp"
- mimetype: "text/plain"
Ticket change [57c8a86444] (rid 165306) by dgp on 2018-09-04 17:29:47:
- closedate changed to: "2458366.22902476"
- icomment:
Note also that Tk binding has its own set of rules for handling exceptional return codes.
- login: "dgp"
- mimetype: "text/plain"