Finally got a straightforward initializer to work

This commit is contained in:
Matthias Neeracher 2014-12-31 04:20:39 +01:00 committed by Matthias Neeracher
parent a0dfc98401
commit 2cdcf9ec65

View File

@ -51,8 +51,8 @@ class ASSerialWin: NSWindowController {
} }
} }
init(port: String) { convenience init(port: String) {
super.init() self.init(windowNibName:"ASSerialWin")
self.port = port self.port = port
let userDefaults = NSUserDefaults.standardUserDefaults() let userDefaults = NSUserDefaults.standardUserDefaults()
@ -83,16 +83,6 @@ class ASSerialWin: NSWindowController {
self.rebuildPortMenu() self.rebuildPortMenu()
}) })
} }
func windowNibName() -> String {
return "ASSerialWin"
}
required override init(window: NSWindow!) {
super.init(window:window)
}
required init?(coder: NSCoder) {
super.init(coder:coder)
}
override func finalize() { override func finalize() {
NSNotificationCenter.defaultCenter().removeObserver(serialObserver) NSNotificationCenter.defaultCenter().removeObserver(serialObserver)