I've got some code that runs a fairly complex algorithm. I want to put together a fairly simple UI that will allow me to monitor the values of the various variables in the algorithm in some graphical ways -- think of it like a dashboard of sorts. 

So, for simplicity's sake, let's say I have an algorithm like what follows. It searches a vector of values for the two values that most closely sum to a target value:

```
import Foundation

class algorithm {

    var numbers = [Double]()
    let numberOfRandoms = 1000

    dynamic var a: String
    dynamic var b: String

    init () {
        // Load initial vector with some random numbers between 0 and 1
        for _ in 1...numberOfRandoms {
            numbers.append(Double(arc4random()) / Double(UINT32_MAX))
        }

        a = " "
        b = " "

    }

    func findTheTwoNumbersThatAddUpTheClosestToTarget(target: Double)  {

        //Initializing this to a very large value
        var currentBestSum = 1000.0

        //Begin brute force search for the optimal solution
        for i in 0...numbers.count-2 {
            for j in i+1...numbers.count-1 {
                //Check to see if the current candidate exceeds the best solution
                if abs(numbers[i] + numbers[j] - target) < currentBestSum {
                    //If it does, store the new champion
                    a = String(i)
                    b = String(j)
                    //And reset the current top score to match
                    currentBestSum = abs(numbers[i] + numbers[j]-target)
                }
            }
        }
    }
}

```

Now, this is just a simple (and silly) example, but it suits these purposes. I basically want to create a simple UI that displays the important values in the process as it runs (dynamically).

In this example, let's say that I just want to display two labels that contain the index values of the two leaders as the algorithm executes.

I created the labels in the storyboard.

Then, I created IBOutlets in the ViewController (Actually, storyboards did it for me when I Ctrl-dragged):

```
class ViewController: NSViewController {

    @IBOutlet weak var a: NSTextField!
    @IBOutlet weak var b: NSTextField!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override var representedObject: AnyObject? {
        didSet {
        // Update the view, if already loaded.
        }
    }
}

```

Then, I ctrl-dragged the labels to the a and b in the algorithm class to create the bindings.

Finally, I create an class variable in the view controller and instantiate it in the viewDidLoad method. This doesn't seem like the right thing to do -- maybe it is. Seems like you would want to keep separate your interface and data...

The labels do, in fact, show up -- but they never show any values of a and b. They just show the default text.

Not sure what I'm doing wrong.

Help!?

P.S., in response to Anthony Kong, I do recognize that I could manually synchronize all the view elements in the code, but I thought the whole point of using bindings was to avoid having to do this manual synchronization. I just can't figure out how to set it up.