Title: IDLE: debugger local/global vars should not be editable
Type: behavior Stage: test needed
Components: IDLE Versions: Python 3.7, Python 3.6
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: kbk, markroseman, roger.serwy, terry.reedy
Priority: normal Keywords:

Created on 2015-09-03 21:29 by markroseman, last changed 2017-06-19 21:00 by terry.reedy.

Messages (5)
msg249690 - (view) Author: Mark Roseman (markroseman) * Date: 2015-09-03 21:29
In the debugger, the values for the variables shown in the locals/globals panes are editable (i.e. using Entry widget) but I don't see any mechanism to have those changes affect anything. If I'm not missing something, why Entry and not Label?
msg249694 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-03 21:56
I already brought this up as part of one of the StackViewer/Debugger/merge issues. Replacing the list with a tree would automatically change this unless the tree was changed to have a entry.  Why? My speculation is an intention never carried out.  Labels could be made to look different, so that cannot be the reason. Can a ttk Treeview allow entries in a column, in case we ever wanted to make changes propagate?
msg249697 - (view) Author: Mark Roseman (markroseman) * Date: 2015-09-03 22:06
Thanks Terry, sorry I missed your previous mention of this. From what I recall the treeview doesn't allow editable items, but what I've done in similar circumstances before (editing text items on a canvas in drawing type programs) was 'place' an entry widget on top of it at the right location as needed and then get rid of the entry when done, which provides the correct effect.

You know what, I think I know why they might have used an Entry widget... for really long values of variables the entry can stay a fixed width and will horizontal scroll, but a label will expand to the size of the content
msg249703 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-04 00:23
That makes sense, given that a string or list could be indefinitely long.
msg296375 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-19 21:00
I believe an Entry validator can reject all keystrokes.  

It seem feasible that globals could be changed.  I could look at what pdb can do and if so, how.
Date User Action Args
2017-06-19 21:00:09terry.reedysetmessages: + msg296375
2017-06-19 20:55:51terry.reedysetassignee: terry.reedy
stage: test needed
components: + IDLE
versions: + Python 3.7, - Python 2.7, Python 3.4, Python 3.5
2015-09-04 00:23:13terry.reedysetmessages: + msg249703
2015-09-03 22:06:33markrosemansetmessages: + msg249697
2015-09-03 21:56:10terry.reedysetmessages: + msg249694
2015-09-03 21:29:13markrosemancreate