Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1181)

#22115: Add new methods to trace Tkinter variables

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 2 months ago by storchaka+cpython
Modified:
1 year, 3 months ago
Reviewers:
tjreedy
CC:
terry.reedy, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Total comments: 8

Patch Set 5 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/whatsnew/3.6.rst View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
Lib/idlelib/configdialog.py View 1 2 3 4 2 chunks +19 lines, -19 lines 0 comments Download
Lib/tkinter/__init__.py View 1 2 3 4 2 chunks +83 lines, -16 lines 0 comments Download
Lib/tkinter/test/test_tkinter/test_variables.py View 1 2 3 4 2 chunks +100 lines, -1 line 0 comments Download

Messages

Total messages: 2
terry.reedy
https://bugs.python.org/review/22115/diff/17679/Doc/whatsnew/3.6.rst File Doc/whatsnew/3.6.rst (right): https://bugs.python.org/review/22115/diff/17679/Doc/whatsnew/3.6.rst#newcode387 Doc/whatsnew/3.6.rst:387: Added methods :meth:`~tkinert.Variable.trace_add`, What is ~tkinert? Looks like _tkinter. ...
1 year, 3 months ago #1
storchaka
1 year, 3 months ago #2
http://bugs.python.org/review/22115/diff/17679/Doc/whatsnew/3.6.rst
File Doc/whatsnew/3.6.rst (right):

http://bugs.python.org/review/22115/diff/17679/Doc/whatsnew/3.6.rst#newcode387
Doc/whatsnew/3.6.rst:387: Added methods :meth:`~tkinert.Variable.trace_add`,
On 2016/06/23 00:40:38, terry.reedy wrote:
> What is ~tkinert?  Looks like _tkinter.

Typo. Should be tkinter. Thank you for catching this.

http://bugs.python.org/review/22115/diff/17679/Doc/whatsnew/3.6.rst#newcode392
Doc/whatsnew/3.6.rst:392: :meth:`~tkinert.Variable.trace_vinfo` that use
obsolete Tcl commands and can
On 2016/06/23 00:40:38, terry.reedy wrote:
> 'can': 'might' would be better. 'can not' is too easily read as 'cannot'

Done.

http://bugs.python.org/review/22115/diff/17679/Lib/tkinter/__init__.py
File Lib/tkinter/__init__.py (right):

http://bugs.python.org/review/22115/diff/17679/Lib/tkinter/__init__.py#newcod...
Lib/tkinter/__init__.py:369: Callback must be a function which is called when
the variable is
On 2016/06/23 00:40:38, terry.reedy wrote:
> 'variable' = tk.Variable()?  That is the only thing I know of with trace*
> methods.

"variable" = Tcl variable. It may be accessed from Tcl side, not using
tkinter.Variable interface. For example choosing an element of Combobox changes
the connected variable and may trigger a callback.

http://bugs.python.org/review/22115/diff/17679/Lib/tkinter/__init__.py#newcod...
Lib/tkinter/__init__.py:370: accessed or modified via the array command, read,
written or unset.
On 2016/06/23 00:40:38, terry.reedy wrote:
>  I only know of var.set (and .initialize) and .get methods that write and
read. 
> I presume "del var" unsets.  What is new mode 'array' command about?

In Tcl, variables can be either scalars or arrays. This mode is for tracing the
use of the array command for array variable. tkinter.Variable doesn't support
array variables.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7