On Thursday, August 22, 2019 at 11:23:58 AM UTC-5, mikkelstuff wrote:
> Others have probably found this but none of my Tcl/Tk code displays correctly running Mac OSX Mojave in that the button labels are unreadable. Not knowing what to do, I have stayed with OSX High Sierra.
>
> Is there a fix for this?
I have not seen this particular problem, however I have a problem since upgrading to Mojave. Regardless if I run from tcl/tk compiled from macports, or a tclkit compiled under Sierra, I receive this warning on terminal when I open the file dialog box and select a file; and before 'Open' or 'Cancel' button is clicked.
objc[5552]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff907f03d8) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x1122c5f50). One of the two will be used. Which one is undefined.
I can select and open the file; however the file dialog will stay open until the action (or code finishes)
Note: This did not happen under Sierra, El Capitan, and or Snow Leopard.
example:
#!/usr/bin/env tclsh
package require Tk
# .... menu items ------
proc openImageCreatePBM {} {
set types {
{TIFF .tiff}
{TIF .tif}
{PNG .png}
{GIF .gif}
{JPEG .jpeg}
{JPG .jpg}
}
set filename [tk_getOpenFile -filetypes $types]
if {$filename eq ""} {return} ; #When cancel is pressed
.txt insert end "Opened $filename for covert to mono...\n"
set fileroot [file rootname [file tail $filename]]; #returns file no extension or dir
set filedir [file dir $filename] ; #returns path without trailing /
# Make command line safe for gs or imagemagick
set escaped_outputFile [escapePath "$filedir[file separator]$fileroot.pbm"] ; #escape spaces in path and filename
set escaped_filename [escapePath $filename] ; # escaped path and filename
global dpi
set cmd "convert -density $dpi -threshold 50% $escaped_filename $escaped_outputFile"
.txt insert end "cmd: $cmd\n"
update idletasks
exec {*}$cmd >>& /dev/tty
}
The code still works but the dialog just keeps hanging till done. In the past dialog closed and the process continued.