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()
|
||||||
|
@ -84,16 +84,6 @@ class ASSerialWin: NSWindowController {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
serialInstances.removeValueForKey(port)
|
serialInstances.removeValueForKey(port)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user