[issue27115] IDLE/tkinter: in simpledialog, != [OK] click

2017-05-26 Thread Louie Lu

Louie Lu added the comment:

We can solve this problem by two ways.

One is to add set_line_and_column() to the end of goto_line_event(), but this 
will make Return trigger set_line_and_column twice.

Another is to change the bind event in simpledialog from "" to 
"" to prevent editor use the KeyRelease event. But I think 
this will have some backward-compatibility problem, maybe we should add a 
parameter to control buttonbox bind on "" or "".

Then we can add set_line_and_column() to the end of the goto_line_event(), and 
have no problem about trigging twice.

--
nosy: +louielu

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27115] IDLE/tkinter: in simpledialog, != [OK] click

2016-06-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If you close the Goto dialog by pressing , the KeyRelease event is sent 
to the editor window. This triggers the <> event.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27115] IDLE/tkinter: in simpledialog, != [OK] click

2016-06-11 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Okay, will take a look at the status bar code and update mechanism.

--
assignee:  -> terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27115] IDLE/tkinter: in simpledialog, != [OK] click

2016-06-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not Tkinter issue, but IDLE issue.

Other similar cases:

Open search dialog and find something. The status bar is not updated. It is 
updated only if you close the search dialog.

Select a text and delete it by a mouse. The status bar is not updated. Choice 
the Edit|Redo action by a mouse. The status bar is not updated.

--
components:  -Tkinter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27115] IDLE/tkinter: in simpledialog, != [OK] click

2016-05-24 Thread Terry J. Reedy

New submission from Terry J. Reedy:

On Win 10, Python 3.5 or 3.6, IDLE Shell or Editor with at least a few lines of 
text: hit Alt-G to open 'Goto' window.  Enter a line # other than the current 
one.  Hit .  Cursor moves to line enter, though it shrinks to one pixel 
wide from two pixels.  Line:col in status bar is updated.

Instead of hitting return, click [OK] button.  Same thing happens except that 
status bar line:col is NOT updated.  Here is relevant code in EditorWindow, 
about line 610

def goto_line_event(self, event):
text = self.text
lineno = tkSimpleDialog.askinteger("Goto",
"Go to line number:",parent=text)
text.mark_set("insert", "%d.0" % lineno)
text.see("insert")

Changing parent=text to parent=self.root makes no difference.  I have not yet 
tried simulating the interaction with button.invoke and 
event_generate('.

My guess is that one of the last two tk methods is supposed to generate a 
cursor moved event that is bound to a reset status bar function.  But somehow 
the previous click instead of keypress inhibits the event.  So this seems a tk 
bug.  Sethiy, what do you think?

The workaround for IDLE is to manually invoke a status bar update.

--
components: IDLE, Tkinter
messages: 266289
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE/tkinter: in simpledialog,  != [OK] click
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com