Tk Source Code
View Ticket
Not logged in
Tcl 2014 Conference, Portland/OR, US, Nov 10-14
Browse the schedule online.
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: (unused) Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Open Last Modified: 2014-01-31 23:22:28
Resolution: None Closed By: nobody
    Closed on:
Description:

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
passed