I have a little problem but I can't figured out ...
I code a sort a Shutdown countdown and I need to re-use the variable name "x" in the following code :
@IBAction func valueChange(sender: NSSlider) {
let x = sender.intValue
valueofSlider.stringValue = "\(x)"
}
IBOutlet weak var countDown: NSTextField!
var starter = false;
@IBAction func startCountDown(sender: NSButton) {
starter = true
}
var trigger = 600 //here I put the value myself but i would like
var trigger = (x * 60) //to get the slider value in seconds