title: Passing a value from inputField to NSTextField
body: <p>I'd like to pass string value from one <code>NSTextField</code> to another <code>NSTextField</code> pressing a button. I used for this <code>for-in loop</code>. I need to pass a value from <code>inputField</code> to <code>visibleText1</code>, then to <code>visibleText2</code> and then to <code>visibleText3</code>. But it doesn't work.</p>
  
  <pre><code>import Cocoa
  
  @NSApplicationMain
  class AppDelegate: NSObject, NSApplicationDelegate {
  
      @IBOutlet weak var window: NSWindow!
      @IBOutlet weak var inputField: NSTextField!
      @IBOutlet weak var visibleText1: NSTextField!
      @IBOutlet weak var visibleText2: NSTextField!
      @IBOutlet weak var visibleText3: NSTextField!
  
      func applicationDidFinishLaunching(aNotification: NSNotification) { }
      func applicationWillTerminate(aNotification: NSNotification) { }
  
      @IBAction func applyButton(sender: AnyObject) {      
          for u in (visibleText1.stringValue...visibleText3.stringValue) {
              visibleText.stringValue[u] = inputField.stringValue
              inputField.stringValue = ""
          }
      }
  }
  </code></pre>
  
  <p>Xcode gives me an error:</p>
  
  <pre><code>// Type 'ClosedInterval&lt;String&gt;' does not conform to protocol 'SequenceType' 
  </code></pre>
  
  <p><strong>How how to do it right?</strong></p>
  
  <p><a href="https://i.stack.imgur.com/tXdhn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tXdhn.png" alt="enter image description here"></a></p>