sproutcore/sproutcore — pull request #820 by publickeating (2012-08-30 03:23:28+00:00)
Title: Adds a warning in debug mode when duplicate bindings for the same key ar...

...e detected. This warning detects when a binding is being created more than once for the same property.

For example, if you define 'smallBinding' like so:

MyApp.ParentClass = SC.View.extend({
smallBinding: …
})

and then extend MyApp.ParentClass further like so:

// ...
childViews: ['childView1'],

childView1: MyApp.ParentClass.extend({

smallBinding: …

// …

then childView1 would have the binding to small appearing twice in its bindings Array. It appears to actually be the same instance of the Binding that appears twice. This can lead to strange behaviour when you try to connect and disconnect the bindings on the fly. I haven't explored it, but maybe it's a memory leak also.

In any case, this warning is meant to inform developers when they are doing something strange like this.