Check-in [c2d2bb250e]

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix fork
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:c2d2bb250ec95b72dc95c34f61fcbb24b7c29463b8fc3a3d823843196f4fb8cf
User & Date: fvogel 2019-01-15 20:41:55
Context
2019-01-16
04:53
Slightly improve the help page (this was suggested by Marc Culler) check-in: cd925dcece user: fvogel tags: trunk
2019-01-15
20:41
Fix fork check-in: c2d2bb250e user: fvogel tags: trunk
15:38
updated index check-in: 163cda6ada user: marc_culler tags: trunk
15:05
Update of #532: change in manual of "bind" explained. check-in: f1ee0d673f user: gcramer tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to index.json.

1

2
3
4
5
6
7
8
9
...
529
530
531
532
533
534
535
536
537
{"tip": {

	"532":{"url":"./tip/532.md","manual (`man bind`) says":"","8. legacy implementation cannot handle homogeneous equal sequences properly, see this script":"","moreover the following issues have been solved":"","keywords":"Tk, bind, event, event loop","":"","[generic/tkbind.c](http":"//core.tcl.tk/tk/artifact/e41f45f7f6ac3447?ln=4178-4203).","case (4)":"Legacy implementation is computing the time difference of nth click with fst click,","this has been observed in applications [scid](http":"//scid.sourceforge.net), and","state":"Draft","(`man bind`)":"","type":"Project","tk-branch":"bug6e8afe516d","author":["Gregor Cramer <gcramer@sourceforge.net>"],"(same with applications [scid](http":"//scid.sourceforge.net), and","[bind-33.13](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6550-6566).","2. immediately after startup of application [scidb](http":"//scidb.sourceforge.net)","[bug6e8afe516d](https":"//core.tcl-lang.org/tk/timeline?r=bug6e8afe516d)","created":"09-Jan-2019","[bind-32.2](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6123-6143)).","title":"# TIP 532: Re-implementation of event loop processing.","can be expressed in a different way":"","[bind-32.4](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6158-6171).","post-history":"","7. see following code":"","[bind-32.6](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6172-6191).","vote":"Pending","tcl-version":"8.6","[severe bugs in binding (tkbind.c)](https":"//core.tcl-lang.org/tk/tktview/6e8afe516df85f6213f436ef7c2fab2ec2d11c76).","[scid vs pc](http":"//scidvspc.sourceforge.net).","this problem occurs often in applications[scidb](http":"//scidb.sourceforge.net),","the following problems, caused by event ring overflow, have been solved":"","is-jest":false},
	"531":{"url":"./tip/531.md","":"","keywords":"Tcl, stubs","created":"14-Dec-2018","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 531: Static Tcl Interpreter Creation Function","/usr/local/include/tcl8.6/tcldecls.h":"#define Tcl_CreateInterp \\","author":["Shannon Noe <shannon.noe@flightaware.com>"],"is-jest":false},
	"530":{"url":"./tip/530.md","tcl-ticket":"a09031e288","created":"13-Dec-2018","post-history":"","state":"Draft","tcl-version":"8.6, 8.7","vote":"Pending","type":"Project","title":"# TIP 530: Control over performance impact of TIP 280","author":["Leon Manukyan <leon.manukyan@gmail.com>"],"is-jest":false},
	"529":{"url":"./tip/529.md","keywords":"Tk, image","created":"07-Dec-2018","state":"Draft","tk-branch":"tip-529-image-metadata","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 529: Add metadata dict property to tk photo image","author":["Harald Oehlmann <oehhar@users.sourceforge.net>"],"is-jest":false},
	"528":{"url":"./tip/528.md","created":"05-Dec-2018","post-history":"","state":"Draft","tk-branch":"offsetof","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 528: Deprecate Tk_Offset()","author":["Jan Nijtmans <jan.nijtmans@gmail.com>"],"is-jest":false},
	"527":{"url":"./tip/527.md","created":"26-Nov-2018","post-history":"","state":"Draft","tcl-branch":"sebres-8-6-timerate","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 527: New measurement facilities in TCL: New command timerate.","discussions-to":"news:comp.lang.tcl","author":["Sergey G. Brester <sebres@users.sourceforge.net>"],"is-jest":false},
	"526":{"url":"./tip/526.md","created":"08-Nov-2018","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 526: Make [expr] Only Accept One Argument","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"is-jest":false},
	"525":{"url":"./tip/525.md","keywords":"Tcl, testing, continuous integration","state":"Final","type":"Project","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"vote-results":"8/0/0 accepted","votes-for":"KBK, SL, AF, DGP, FV, DKF, AK, JN","votes-against":"none","created":"24-Oct-2018","title":"# TIP 525: Make Tcltest Report Overall Success in a Machine-Readable Way","post-history":"","vote":"Done","tcl-version":"8.5","votes-present":"none","is-jest":false},
................................................................................
	"5":{"url":"./tip/5.md","created":"17-Oct-2000","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 5: Make TkClassProcs and TkSetClassProcs Public and Extensible","author":["Eric Melski <ericm@ajubasolutions.com>"],"is-jest":false},
	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <welch@acm.org>","Donal K. Fellows <fellowsd@cs.man.ac.uk>","Larry W. Virden <lvirden@cas.org>","Larry W. Virden <lvirden@yahoo.com>"],"is-jest":false},
	"3":{"url":"./tip/3.md","created":"14-Sep-2000","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <a.kupries@westend.com>","Donal K. Fellows <fellowsd@cs.man.ac.uk>"],"is-jest":false},
	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <a.kupries@westend.com>","Donal K. Fellows <fellowsd@cs.man.ac.uk>","Don Porter <dgp@users.sourceforge.net>","Mo DeJong <no@spam.com>","Larry W. Virden <lvirden@yahoo.com>","Kevin Kenny <kennykb@acm.org>"],"is-jest":false},
	"1":{"url":"./tip/1.md","created":"14-Sep-2000","post-history":"","state":"Active","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <donal.fellows@cs.man.ac.uk>"],"is-jest":false},
	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <ouster@pacbell.net>"],"is-jest":false},
	"@min": 0,
	"@max": 532
}, "@timestamp": 1547394452}

>
|







 







|
|
1
2
3
4
5
6
7
8
9
10
...
530
531
532
533
534
535
536
537
538
{"tip": {
	"533":{"url":"./tip/533.md","keywords":"Tk, menubutton","":"","[menu man page](https":"//www.tcl.tk/man/tcl/TkCmd/menu.htm).","state":"Draft","type":"Project","tk-branch":"bug-70e531918e","author":["Marc Culler"],"three arguments":"two coordinates and an index.  That function uses the","[70e531918e](https":"//core.tcl-lang.org/tk/tktview/70e531918e6d99cbdd8b527386fec15872c64216).","created":"13-Jan-2019","by calling <b>":":tk::PostOverPoint</b> which, like the proposed extension, accepts","a method <b>[nsmenu popupmenupositioningitem":"atLocation:inView]</b> which draws the","title":"# TIP 533: Extension of the menu post command.","the [bug-70e531918e](https":"//core.tcl-lang.org/tk/timeline?r=bug-70e531918e)","post-history":"","vote":"Pending","tcl-version":"8.6","is-jest":false},
	"532":{"url":"./tip/532.md","moreover the following issues have been solved":"","keywords":"Tk, bind, event, event loop","":"","[generic/tkbind.c](http":"//core.tcl.tk/tk/artifact/e41f45f7f6ac3447?ln=3287-3307).","this has been observed in applications [scid](http":"//scid.sourceforge.net), and","state":"Draft","type":"Project","tk-branch":"bug6e8afe516d","issue (1)":"Legacy implementation is computing the time difference of nth click with first click,","says (<code>man bind</code>)":"","author":["Gregor Cramer <gcramer@sourceforge.net>"],"(same with applications [scid](http":"//scid.sourceforge.net), and","[bind-33.13](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6550-6566).","5. legacy implementation cannot handle homogeneous equal sequences properly, see this script":"","2. immediately after startup of application [scidb](http":"//scidb.sourceforge.net)","[bug6e8afe516d](https":"//core.tcl-lang.org/tk/timeline?r=bug6e8afe516d)","created":"09-Jan-2019","manual (<code>man bind</code>) says":"","[bind-32.2](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6123-6143)).","title":"# TIP 532: Re-implementation of event loop processing.","how to choose the most specific binding, has to be changed":"","4. see following code":"","can be expressed in a different way":"","[bind-32.4](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6158-6171).","this problem occurs often in application [scidb](http":"//scidb.sourceforge.net),","post-history":"","[bind-32.6](https":"//core.tcl-lang.org/tk/artifact/6377cb0d762b7261?ln=6172-6191).","vote":"Pending","tcl-version":"8.6","[severe bugs in binding (tkbind.c)](https":"//core.tcl-lang.org/tk/tktview/6e8afe516df85f6213f436ef7c2fab2ec2d11c76).","[scid vs pc](http":"//scidvspc.sourceforge.net).","the following problems, caused by event ring overflow, have been solved":"","is-jest":false},
	"531":{"url":"./tip/531.md","":"","keywords":"Tcl, stubs","created":"14-Dec-2018","post-history":"","state":"Draft","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 531: Static Tcl Interpreter Creation Function","/usr/local/include/tcl8.6/tcldecls.h":"#define Tcl_CreateInterp \\","author":["Shannon Noe <shannon.noe@flightaware.com>"],"is-jest":false},
	"530":{"url":"./tip/530.md","tcl-ticket":"a09031e288","created":"13-Dec-2018","post-history":"","state":"Draft","tcl-version":"8.6, 8.7","vote":"Pending","type":"Project","title":"# TIP 530: Control over performance impact of TIP 280","author":["Leon Manukyan <leon.manukyan@gmail.com>"],"is-jest":false},
	"529":{"url":"./tip/529.md","keywords":"Tk, image","created":"07-Dec-2018","state":"Draft","tk-branch":"tip-529-image-metadata","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 529: Add metadata dict property to tk photo image","author":["Harald Oehlmann <oehhar@users.sourceforge.net>"],"is-jest":false},
	"528":{"url":"./tip/528.md","created":"05-Dec-2018","post-history":"","state":"Draft","tk-branch":"offsetof","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 528: Deprecate Tk_Offset()","author":["Jan Nijtmans <jan.nijtmans@gmail.com>"],"is-jest":false},
	"527":{"url":"./tip/527.md","created":"26-Nov-2018","post-history":"","state":"Draft","tcl-branch":"sebres-8-6-timerate","tcl-version":"8.5","vote":"Pending","type":"Project","title":"# TIP 527: New measurement facilities in TCL: New command timerate.","discussions-to":"news:comp.lang.tcl","author":["Sergey G. Brester <sebres@users.sourceforge.net>"],"is-jest":false},
	"526":{"url":"./tip/526.md","created":"08-Nov-2018","post-history":"","state":"Draft","tcl-version":"9.0","vote":"Pending","type":"Project","title":"# TIP 526: Make [expr] Only Accept One Argument","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"is-jest":false},
	"525":{"url":"./tip/525.md","keywords":"Tcl, testing, continuous integration","state":"Final","type":"Project","author":["Donal K. Fellows <donal.k.fellows@manchester.ac.uk>"],"vote-results":"8/0/0 accepted","votes-for":"KBK, SL, AF, DGP, FV, DKF, AK, JN","votes-against":"none","created":"24-Oct-2018","title":"# TIP 525: Make Tcltest Report Overall Success in a Machine-Readable Way","post-history":"","vote":"Done","tcl-version":"8.5","votes-present":"none","is-jest":false},
................................................................................
	"5":{"url":"./tip/5.md","created":"17-Oct-2000","post-history":"","state":"Final","vote":"Done","tcl-version":"8.4","type":"Project","title":"# TIP 5: Make TkClassProcs and TkSetClassProcs Public and Extensible","author":["Eric Melski <ericm@ajubasolutions.com>"],"is-jest":false},
	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <welch@acm.org>","Donal K. Fellows <fellowsd@cs.man.ac.uk>","Larry W. Virden <lvirden@cas.org>","Larry W. Virden <lvirden@yahoo.com>"],"is-jest":false},
	"3":{"url":"./tip/3.md","created":"14-Sep-2000","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <a.kupries@westend.com>","Donal K. Fellows <fellowsd@cs.man.ac.uk>"],"is-jest":false},
	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <a.kupries@westend.com>","Donal K. Fellows <fellowsd@cs.man.ac.uk>","Don Porter <dgp@users.sourceforge.net>","Mo DeJong <no@spam.com>","Larry W. Virden <lvirden@yahoo.com>","Kevin Kenny <kennykb@acm.org>"],"is-jest":false},
	"1":{"url":"./tip/1.md","created":"14-Sep-2000","post-history":"","state":"Active","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <donal.fellows@cs.man.ac.uk>"],"is-jest":false},
	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <ouster@pacbell.net>"],"is-jest":false},
	"@min": 0,
	"@max": 533
}, "@timestamp": 1547584898}

Changes to index.md.

116
117
118
119
120
121
122








123
124
125
126
127
128
129
<th>Type</th>
<th>Tcl Version</th>
<th>Status</th>
<th>Title</th>
<th>Impl.</th>
</tr></thead><tbody>









<tr class='project projectdraft projectdraft86 project86'>
<td valign='top'><a href='./tip/532.md'>532</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.6</td>
<td valign='top'>Draft</td>
<td valign='top'># TIP 532: Re-implementation of event loop processing.</td>
<td valign='top'><a href='/tk/timeline?r=bug6e8afe516d'>Link</a></td>







>
>
>
>
>
>
>
>







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<th>Type</th>
<th>Tcl Version</th>
<th>Status</th>
<th>Title</th>
<th>Impl.</th>
</tr></thead><tbody>

<tr class='project projectdraft projectdraft86 project86'>
<td valign='top'><a href='./tip/533.md'>533</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.6</td>
<td valign='top'>Draft</td>
<td valign='top'># TIP 533: Extension of the menu post command.</td>
<td valign='top'><a href='/tk/timeline?r=bug-70e531918e'>Link</a></td>
</tr>
<tr class='project projectdraft projectdraft86 project86'>
<td valign='top'><a href='./tip/532.md'>532</a></td>
<td valign='top'>Project</td>
<td valign='top'>8.6</td>
<td valign='top'>Draft</td>
<td valign='top'># TIP 532: Re-implementation of event loop processing.</td>
<td valign='top'><a href='/tk/timeline?r=bug6e8afe516d'>Link</a></td>

Added tip/533.md.























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# TIP 533: Extension of the menu post command.
	Author:         Marc Culler
	State:          Draft
	Type:           Project
	Vote:           Pending
	Created:        13-Jan-2019
	Post-History:  
	Keywords:       Tk, menubutton
	Tcl-Version:    8.6
	Tk-Branch:      bug-70e531918e
----

# Abstract

This TIP proposes to modify the menu post command by adding one optional
argument which specifies the index of a menu item.  The current command
accepts two arguments, x and y, which specify the screen coordinates where the
upper left corner of the menu should be posted.  If the proposed optional
index is provided it will mean that the upper left corner of the item with
that index should be located at the point specified by x and y.

# Rationale

Within Tk itself the menu post command is primarily used for posting a
<b>Tk_optionMenu</b>.  This widget needs to draw the menu so that the currently
selected menu item is placed on top of the widget's menuButton.  This is done
by calling <b>::tk::PostOverPoint</b> which, like the proposed extension, accepts
three arguments: two coordinates and an index.  That function uses the
previously computed menu geometry to compute a location for the upper left
corner of the menu which will result in correct positioning of the item
specified by the index argument.  It then calls the menu post command with the
computed x and y coordinates.

On Windows and macOS popup menus are drawn by the system.  Determining the
geometry of a menu on these systems involves reverse engineering, since there
is no geometry specification available.  Reverse engineering proprietary
software is necessarily subject to errors which can be avoided if it is
possible to use calls to routines provided by the system library.  As it
happens, there is such a routine available on macOS.  Apple's NSMenu object has
a method <b>[NSMenu popUpMenuPositioningItem:atLocation:inView]</b> which draws the
menu so that the upper left corner of the specified menu item is located at
the point given as the atLocation parameter.  The extension proposed in this
TIP makes it possible to conveniently use this NSMenu method within the
platform specific <b>TkpPostMenu</b> function, provided that the signature of that
function is also extended to include a third integer argument specifying the
index of the item.

This TIP arose from an attempt to fix a number of rendering bugs for
menubuttons on all platforms which were reported in ticket
[70e531918e](https://core.tcl-lang.org/tk/tktview/70e531918e6d99cbdd8b527386fec15872c64216).
Because these bugs exist in Tk 8.6.9 and because fixing them is greatly
simplified by this very small extension to Tk, this TIP is targeting version
8.6.

# Specification and documentation

  <i>pathName</i> <b>post</b> <i>x y ?index?</i>

The change consists in the addition of the optional <i>index</i>
argument. If <i>index</i> is present the menu will be posted so that 
the entry with that index is displayed at the given <i>x y</i> coordinates.
Backwards compatibility is guaranteed  since the command does not
change its behavior if this argument is omitted. The optional <i>index</i>
can be specified using any of the forms currently allowed in the
[menu man page](https://www.tcl.tk/man/tcl/TkCmd/menu.htm).

# Reference Implementation

All of the changes needed to implement this TIP are included in the leaf of
the [bug-70e531918e](https://core.tcl-lang.org/tk/timeline?r=bug-70e531918e)
branch of the Tk fossil repository.

# Copyright

This document has been placed in the public domain.