Tk Source Code

View Ticket
Login
Ticket UUID: 769367b4c9b8e4fc05afaf67dc0aa6e3c1dba682
Title: Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer
Type: Bug Version:
Submitter: anonymous Created on: 2018-04-08 20:35:20
Subsystem: (unused) Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2018-07-31 12:43:45
Resolution: Invalid Closed By: kevin_walzer
    Closed on: 2018-07-31 12:43:45
Description:
The problem :

Tooltip doesn't appear with Python 64-bit on Mac OS 10.13.4 

Here is the answer received from Python support group :

Ned Deily <[email protected]> added the comment:

I don't know anything about appJar (looks interesting!) but any issue like this is almost certainly a Tk issue, since Python's tkinter provides a fairly lightweight wrapper around calls to Tk.

As far as I can tell from a quick test, it appears that the difference here is due to some change in the macOS Cocoa Tk behavior in more recent versions.  As documented, the python.org 3.6.5 macOS 64-bit-only Python uses its own Tcl/Tk 8.6.8 while the 64-bit/32-bit installer continues to link with an external Tcl/Tk 8.5.x version. For that variant, the system looks first in /Library/Frameworks for third-party Tcl and Tk 8.5.x frameworks, such as the recommended ActiveTcl version (https://www.python.org/download/mac/tcltk/) and, if none found there, falls back to the Apple-supplied Tcl/Tk 8.5 frameworks in /System/Library/Frameworks.  With the recommended ActiveState 8.5.18 Tcl/Tk version installed, the tooltips also do not appear just like with the 64-bit-only 8.6.8 version.  Falling back to the old, buggy Apple-supplied 8.5.9 versions, the tooltips do appear, which I assume is what is happening on your system.  I was also able to test with an X11 Tk 8.6.8 on macOS and there the tooltips *do* work.  So, it appears that somewhere between Tk 8.5.9 and 8.5.18, the behavior of tooltips in Tk's macOS Aqua Cocoa implementation has changed. Suggest you pursue this on the Tcl/Tk project's Tk issue tracker (https://core.tcl.tk/tk/ticket) and/or its tcl-mac mailing list (https://sourceforge.net/p/tcl/mailman/tcl-mac/).  It might help to have a pure Tcl test case.  Good luck!  (Nosying: Kevin Walzer from the Tk project as a heads up.)
User Comments: kevin_walzer added on 2018-07-31 12:43:18:
This issue is likely related to the internal implementation of tooltips in Python, as generally tooltips work just fine on macOS (BWidgets, various samples from the Tcl'ers wiki). Closing this ticket and redirecting back to the Python bug tracker to review the internal implementation of tooltips there.

ronaldoussoren added on 2018-07-31 06:09:03:
A related downstream issue is <https://bugs.python.org/issue34275>, which mentions that tooltips no longer work with IDLE as well, this is when using Tcl/Tk 8.6.8 as included with the Python 3.7.0 installer.

kevin_walzer added on 2018-04-09 00:45:43:
(Original bug reported at https://bugs.python.org/issue33241)

After testing your Python code with a tweak or two, I got a warning of this type: 

appJar:WARNING [Line 7->10528/_addTooltip]: ToolTips unavailable - check tooltip.py is in the lib folder

I am able to use this same ToolTips code in my own project, so I am not sure this is a Tk issue but perhaps an issue with the way your appJar library is coded. If I recall correctly I may have had to run the tooltips package through 2to3 to get it working with a current Python.