Finally got a straightforward initializer to work
This commit is contained in:
parent
a0dfc98401
commit
2cdcf9ec65
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user