Author terry.reedy
Recipients Al.Sweigart, littleq0903, louielu, markroseman, ned.deily, paulsfo, roger.serwy, serhiy.storchaka, suddha.sourav, taleinat, terry.reedy
Date 2017-05-30.16:25:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496161545.61.0.315765460004.issue15786@psf.upfronthosting.co.za>
In-reply-to
Content
Almost there.  Clicking on a list item or the scrollbar works to select an item or scroll.  Clicking outside the box *before* clicking elsewhere works to dismiss box.  Clicking outside the box *after* clicking inside dismisses the box, but also results in the following, printed twice.

Exception in Tkinter callback
Traceback (most recent call last):
  File "F:\dev\cpython\lib\tkinter\__init__.py", line 1699, in __call__
    return self.func(*args)
  File "F:\dev\cpython\lib\tkinter\__init__.py", line 745, in callit
    func(*args)
  File "F:\dev\cpython\lib\idlelib\autocomplete_w.py", line 257, in _hide_event_check
    if not self.autocompletewindow.focus_get():
AttributeError: 'NoneType' object has no attribute 'focus_get'

The immediate fix is to catch AttributeError or, perhaps better, wrap the body of _hide_event_check with "if self.autocompletewindow:".  There should be no need to hide the window if it is already gone.

I am puzzled as to why clicking in the box affects later clicks outside the box.
History
Date User Action Args
2017-05-30 16:25:45terry.reedysetrecipients: + terry.reedy, taleinat, ned.deily, roger.serwy, markroseman, Al.Sweigart, serhiy.storchaka, littleq0903, suddha.sourav, paulsfo, louielu
2017-05-30 16:25:45terry.reedysetmessageid: <1496161545.61.0.315765460004.issue15786@psf.upfronthosting.co.za>
2017-05-30 16:25:45terry.reedylinkissue15786 messages
2017-05-30 16:25:45terry.reedycreate