[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-08-02 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +8143

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-08-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I verified for my machine also that adding .update_idletasks(), as in 
calltips_2-2.diff works for my 3.7.0 installation.  I will assume until someone 
says otherwise that this is generally sufficient.

I am preparing a PR with the patch and will separately deal with the merge 
conflict I expect for PR7683.

--
assignee:  -> terry.reedy
stage: needs patch -> patch review
versions: +Python 2.7

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-08-01 Thread Kevin Walzer


Kevin Walzer  added the comment:

Tal, your proposed revisions to the patch work fine. It's harmless to leave the 
older calls to MacWindowStyle there. New patch attached.

--
Added file: https://bugs.python.org/file47726/calltips_w-2.diff

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-08-01 Thread Tal Einat


Tal Einat  added the comment:

Perhaps we can use .update_idletasks() rather than .update()? That tends to 
have less of a performance hit. My macOS setup is currently not working so I 
can't test this myself.

Regarding the "MacWindowStyle" call, IDLE is backported to older versions of 
Python and generally strives to support older systems. Can you tell which 
versions of macOS/OSX this is needed in? If so, I suggest surrounding that call 
with an OS version check, which could be removed at a later time when the 
relevant OS versions are truly irrelevant.

--

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you! Adding update worked for calltip_w.  Adding update to tooltip and 
copying
   tw.lift()  # work around bug in Tk 8.5.18+ (issue #24570)
from calltip worked for tooltip.  (It seems the bug is still present. ;-)  I 
will either patch these files directly or modify the patch for #33839 tomorrow.

--

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Kevin Walzer


Kevin Walzer  added the comment:

With the attached patch, the calltip now displays in the test in calltips_w.py 
on macOS. As I suspected, a judicious call to "update" forces the event loop to 
cycle on macOS. It should be harmless on other platforms, but if it causes some 
sort of performance slowdown, it can be wrapped in a call to "tk 
windowingsystem" eq "aqua" (not sure how to implement that in this module) so 
it only runs on the Mac. I also removed the platform call to "MacWindowStyle" 
as it is no longer needed on recent versions of the Mac.

--
keywords: +patch
Added file: https://bugs.python.org/file47725/calltip_w.diff

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE currently uses tooltips only for calltips describing a function's call 
signature.  Within Lib/idlelib:
calltip.py (renamed from calltips.py after the 3.7.0/3.6.6 release) has the 
logic for when to raise one and its content.
calltip_w.py (which I intend to merge into calltip.py) has the code for the 
calltip itself and its closing.

Issue #1529353 and PR7626) proposes a second use of tooltips. I would also like 
to add helptips to some dialog fields and if possible, some menu entries.

tooltip.py has simple generic tooltip code.  calltip_w does not import this but 
says in its docstring 'after tooltip.py'. Since tooltip is not currently used 
anywhere in IDLE, I have considered removing it.

Issue #33839 and PR7683 instead propose to upgrade tooltip and refactor 
calltip_w to import and use tooltip.  I have held off merging the PR because of 
tooltips not working on Mac.  But I need to do so soon to unblock the issue 
above and possible other enchancements.

Both tooltip and calltip_w have run-when-main test functions that work on 
Windows (and I presume Linux) but fail on 10.13.6 with 3.7.0.  The tooltip test 
is simpler in that it does not involve any truly IDLE-specific code.  The 
calltip_w test does not involve calltip.  Both use IDLE's human-verification 
test driver that provides a root window with test instructions.  In the bash 
terminal, run
python3 -m idlelib.tooltip
python3 -m idlelib.calltip_w

Kevin, I would be very appreciative if you can suggest a tweak that makes 
tooltips work everywhere.

--

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@terry.reed: Kevin Walzer is a maintainer for Tk on macOS.

I know too little of IDLE to answer his questions.

--

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Kevin Walzer


Kevin Walzer  added the comment:

Please provide a short working Python script that reproduces the problem. Also, 
please point me to the internal implementation of tooltips in idlelib. Tooltips 
work just fine on Tk on the Mac, but there are many different ways to implement 
them and I suspect Python's implementation can likely be tweaked. It also may 
be related to event handling.

--
nosy: +wordtech

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

https://core.tcl.tk/tk/tktview/769367b4c9b8e4fc05afaf67dc0aa6e3c1dba682 is an 
Tcl/Tk issue about issue34275, which is also about Tooltips. 

I've added a comment to the Tk issue to note that IDLE also has problems (the 
other ticket is about a 3th-party library).

--

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

With 64 bit 3.7.0, I verified multiple problems.  Calltips do not display 
either automatically or manually with ^B or menu selection.  I closed #34281 in 
favor of #34120 and will report there and on #34047.

--

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Two more pieces of evidence that there is a problem with tkinter/tk8.6 on Mac.  
On #34120, Vlad T. confirmed the misbehavior on 3.5 compiled for 8.6.  #34281 
reports another problem with an editor subwindow on 3.7 Mac.

There are now 4 issues about some IDLE feature failing specifically on MacOS 
with tcl/tk 8.6.8.  (All but 1 with 3.7.0.)
#34047: editor scrollbar slider 'sticks' at bottom
#34120: freeze when closing config and about dialogs
#34281: (new today) wrong window activates when closing "Go to Line" box
#34275: (this issue) calltips do not appear

The editor scrollbar was touched last May.  The config and about dialogs 
contents were edited last summer.  But the calltip and and goto code is 
essentially untouched for 2 years.

I am changing the title from 'IDLE: no calltips on MacOS with tk 8.6' and 
adding tkinter as component and Serhiy as Nosy.

I have never used a Mac, but I have available a 2012 MacBook Air, which I just 
upgraded to current High Sierra 10.13.6.  I intend to install 3.7, confirm the 
bugs, and try to find simpler failing examples.  But I cannot patch _tkinter, 
let alone tcl/tk.

--
assignee: terry.reedy -> 
components: +Tkinter
nosy: +serhiy.storchaka
title: IDLE: no calltips on MacOS with tk 8.6 -> Problems with tkinter and 
tk8.6 on MacOS

___
Python tracker 

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