Sender should be Any? to reflect the fact it may be nil. This nuance seems to make the difference on Xcode 9.3/Swift 4.1 between crashing or not. Without this change, refreshing crashes every time, presumably because Swift is making assumptions about the parameter being non-nil and refreshProgressDidChange calls it explicitly with a nil parameter.

This commit is contained in:
Daniel Jalkut 2018-01-29 11:48:09 -05:00
parent 2d7d903bca
commit e4136c2165

View File

@ -113,7 +113,7 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
// MARK: Toolbar
@objc func makeToolbarValidate(_ sender: Any) {
@objc func makeToolbarValidate(_ sender: Any?) {
window?.toolbar?.validateVisibleItems()
}