Tk Source Code

View Ticket
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to
or submit via the online form by Aug 20.
Ticket UUID: 31cd33dbf0af9600f9f13b03f07b7dbf0a42d1f4
Title: Cocoa Tk widgets do detect invalid -bitmap values
Type: Bug Version: 8.6.1
Submitter: ned.deily Created on: 2014-01-31 23:22:28
Subsystem: 66. Aqua Window Operations Assigned To: kevin_walzer
Priority: 5 Medium Severity: Important
Status: Open Last Modified: 2016-08-22 08:26:33
Resolution: None Closed By: nobody
    Closed on:

When a non-existant bitmap file is given to a widget with X11 or Aqua Carbon Tk 8.4 on OS X, an exception is returned. But with Cocoa Tk 8.5 or 8.6 on OS X, the error is not detected by Tk but does result in an OS X error message.

With X11 Tk (MacPorts 8.6.1)

$ /macports/bin/wish8.6
% if [catch {button .b -bitmap "blah"} result] {
    puts "Failed: $result"
} else {
    puts "passed"
Failed: bitmap "blah" not defined)

With Cocoa Tk 8.6.1 or 8.5.15:

$ /usr/local/bin/wish8.6
% if [catch {button .b -bitmap "blah"} result] {
    puts "Failed: $result"
} else {
    puts "passed"
2014-01-31 14:58:07.134 Wish[9555:507] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: blah