Object mixin initialization fix #822

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
1 participant
@publickeating
Owner

publickeating commented Sep 1, 2012

Fixes #358 and #335 by association.

publickeating added some commits Aug 31, 2012

Adds tests to indicate how doing a mixin() on an object, fails to reg…
…ister dependent properties, observers and bindings correctly from the mixed in objects.
Removes unneeded Arrays from SC.Object classes.
- Once initObservable is called we don't need the set up properties any longer, so we can remove them to save memory.
Fixes SC.Object.prototype.mixin so that the mixed in objects' observa…
…bles are initialized.

- Instead of using SC.mixin (suitable for mixing into a Class), we use SC._object_extend on the object itself with the mixins.  This registers the _bindings, _properties and _observers set up variables for initObservable.
- We then reset the initObservable() status and run it again using our new  _bindings, _properties and _observers to be setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment