Crash when changing fonts
(approximate copy of message posted to tcl-mac) I distribute a Mac application based on Tkinter that crashes when a user updates certain preferences that use the option database, including font size and some colors. It works OK with Tcl/Tk 8.5.11, but crashes using 8.5.12, 8.5.12.1, 8.5.13 and 8.1.14. I was finally able to come up with a simple test case in tcl (appended). I opened a ticket at the Tk bug reporter, but I figured I'd also post here, just to spread the word. If anyone can think of a workaround (other than sticking with 8.5.11, which is what I've done so far, but it doesn't work with Mavericks) I'd really appreciate it. So far nothing I've tried works (except not adding entries to the "apple" menu, which would make the Mac version much less Mac-like, or never touching the option database, which removes a useful feature). -- Russell # tcl menu crash; to crash run the code and push the button menu .parentMenu menu .parentMenu.apple -tearoff 0 # the following line is optional, but shows the menu is created .parentMenu.apple add command -label "Something" .parentMenu add cascade -label Wish -menu .parentMenu.apple font create testFont option add "*Button.font" testFont button .btn -text "Change Font" -command { font configure testFont -size 20 } pack .btn . configure -menu .parentMenu In Tkinter this reads as: import Tkinter import tkFont root = Tkinter.Tk() parentMenu = Tkinter.Menu(root) appleMenu = Tkinter.Menu(parentMenu, name="apple", tearoff=0) appleMenu.add_command(label="Something") # may be omitted parentMenu.add_cascade(label="Python", menu=appleMenu) font = tkFont.Font() root.option_add("*Button.font", font) def changeFont(): font.configure(size=20) btn = Tkinter.Button(root, text="Change Font", command=changeFont) btn.pack() root["menu"] = parentMenu root.mainloop()
In article <rowen-75A55C.12420224102013@news.gmane.org>, "Russell E. Owen" <rowen@uw.edu> wrote:
(approximate copy of message posted to tcl-mac)
I distribute a Mac application based on Tkinter that crashes when a user updates certain preferences that use the option database, including font size and some colors. It works OK with Tcl/Tk 8.5.11, but crashes using 8.5.12, 8.5.12.1, 8.5.13 and 8.1.14.
I was finally able to come up with a simple test case in tcl (appended). I opened a ticket at the Tk bug reporter, but I figured I'd also post here, just to spread the word.
(...see previous posting for code). I just wanted to say that ActiveState Tcl/Tk 8.5.15 still has this bug. (Does anyone know if 8.5.15 contains the fix for Mavericks?). -- Russell
In article <rowen-AB26B7.11170030102013@news.gmane.org>, "Russell E. Owen" <rowen@uw.edu> wrote:
In article <rowen-75A55C.12420224102013@news.gmane.org>, "Russell E. Owen" <rowen@uw.edu> wrote:
(approximate copy of message posted to tcl-mac)
I distribute a Mac application based on Tkinter that crashes when a user updates certain preferences that use the option database, including font size and some colors. It works OK with Tcl/Tk 8.5.11, but crashes using 8.5.12, 8.5.12.1, 8.5.13 and 8.1.14.
I was finally able to come up with a simple test case in tcl (appended). I opened a ticket at the Tk bug reporter, but I figured I'd also post here, just to spread the word.
(...see previous posting for code).
I just wanted to say that ActiveState Tcl/Tk 8.5.15 still has this bug. (Does anyone know if 8.5.15 contains the fix for Mavericks?).
AFAIK, the current A/S 8.5.15.0 does not contain the fix. I believe an update is on its way. -- Ned Deily, nad@acm.org
On 10/30/13, 2:17 PM, Russell E. Owen wrote:
I just wanted to say that ActiveState Tcl/Tk 8.5.15 still has this bug. (Does anyone know if 8.5.15 contains the fix for Mavericks?).
AS hasn't released an update yet for Mavericks AFAIK; they posted links over the weekend for beta testing of the new build. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com
participants (3)
-
Kevin Walzer -
Ned Deily -
Russell E. Owen