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
class ASPreferences: NSWindowController, NSOpenSavePanelDelegate {
dynamic var toolchainPref : String = "" {
didSet(oldPref) {
NSUserDefaults.standardUserDefaults().setObject(toolchainPref, forKey: "Toolchain")
var toolchainPref : String {
get {
return NSUserDefaults.standardUserDefaults().objectForKey("Toolchain") as String
}
set(newToolchain) {
NSUserDefaults.standardUserDefaults().setObject(newToolchain, forKey: "Toolchain")
}
}
var toolchainType : Int {
@ -63,11 +66,6 @@ class ASPreferences: NSWindowController, NSOpenSavePanelDelegate {
self.init(windowNibName:"ASPreferences")
}
override func awakeFromNib() {
super.awakeFromNib()
toolchainPref = NSUserDefaults.standardUserDefaults().objectForKey("Toolchain") as String
}
var hasCrossPackAVR : Bool {
get {
return NSFileManager.defaultManager().fileExistsAtPath("/usr/local/CrossPack-AVR/bin")