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) {
|
||||
super.init()
|
||||
convenience init(port: String) {
|
||||
self.init(windowNibName:"ASSerialWin")
|
||||
self.port = port
|
||||
|
||||
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() {
|
||||
NSNotificationCenter.defaultCenter().removeObserver(serialObserver)
|
||||
serialInstances.removeValueForKey(port)
|
||||
|
|
Loading…
Reference in New Issue
Block a user