title: Force refresh on another ViewController component with swift
body: <p>I'm trying to pass a trigger between 2 view controller but i can't find something that works ...</p>
  
  <p>I have the main controller with a NSTableView, source linked, View Base.</p>
  
  <p>main Controller class :</p>
  
  <pre><code>class ViewController: NSViewController {
  </code></pre>
  
  <p>I have an array defined in Global variables.
  on the viewDidLoad i add 2 elements in my array, then i use setDelegate and setDataSource.
  It works fine.</p>
  
  <pre><code>myLib.myCoins =  fillCoinsTable()
  print ("My lib has \(myLib.myCoins.count) objects ")
  mainCoinTable.setDelegate(self)
  mainCoinTable.setDataSource(self)
  </code></pre>
  
  <p>I have a segue from the WINDOWS CONTROLLER to my second view Controller.
  (It's a ToolBar button). The segue is "Sheet" kind.</p>
  
  <p>This second controller allows me to add an element in my global variable arrays, with a button "Save" .</p>
  
  <p>Code on the second controller</p>
  
  <pre><code>@IBAction func addCoinButton(sender: AnyObject) {
  
          //We add the coin
          let newCoin:coin = coin(n: textName.stringValue)
          newCoin.Year =  Int.init(textYear.stringValue)
  
          myLib.myCoins.append(newCoin)
  
          self.dismissController(self)
  
      }
  </code></pre>
  
  <p>If i add a button on the main controller, to reloadData on the TableView, it works fine. The third element is added.</p>
  
  <p>but i would like that to be automatic ....</p>
  
  <p>I tried segue, but mine is not between view controller but with the windows controller. </p>
  
  <p>Can you please help ?</p>
  
  <p>Thanks,
  Nicolas</p>