Fix order depedency

This commit is contained in:
Matthias Neeracher 2014-12-27 02:20:55 +01:00 committed by Matthias Neeracher
parent beb70e0158
commit f560ce747b

View File

@ -13,9 +13,12 @@ private let kASToolchainArduino = 1
private let kASToolchainOther = 2 private let kASToolchainOther = 2
class ASPreferences: NSWindowController, NSOpenSavePanelDelegate { class ASPreferences: NSWindowController, NSOpenSavePanelDelegate {
dynamic var toolchainPref : String = "" { var toolchainPref : String {
didSet(oldPref) { get {
NSUserDefaults.standardUserDefaults().setObject(toolchainPref, forKey: "Toolchain") return NSUserDefaults.standardUserDefaults().objectForKey("Toolchain") as String
}
set(newToolchain) {
NSUserDefaults.standardUserDefaults().setObject(newToolchain, forKey: "Toolchain")
} }
} }
var toolchainType : Int { var toolchainType : Int {
@ -63,11 +66,6 @@ class ASPreferences: NSWindowController, NSOpenSavePanelDelegate {
self.init(windowNibName:"ASPreferences") self.init(windowNibName:"ASPreferences")
} }
override func awakeFromNib() {
super.awakeFromNib()
toolchainPref = NSUserDefaults.standardUserDefaults().objectForKey("Toolchain") as String
}
var hasCrossPackAVR : Bool { var hasCrossPackAVR : Bool {
get { get {
return NSFileManager.defaultManager().fileExistsAtPath("/usr/local/CrossPack-AVR/bin") return NSFileManager.defaultManager().fileExistsAtPath("/usr/local/CrossPack-AVR/bin")