sjohnsonaz / BuildJS-Full

A simple utility for class definition, inheritance, dynamic loading, MVVM, Widgets, and backend MVC.
http://buildjs.com
0 stars 0 forks source link

Manage BindingHandlers created inside Templates. #92

Closed sjohnsonaz closed 9 years ago

sjohnsonaz commented 9 years ago

When a Template is created, it will likely also create BindingHandlers. These may not be destroyed when the ForEachBinding is manipulated.

Templates may also generate Widgets. These should correctly set the Widget.parent property.

sjohnsonaz commented 9 years ago

Container.destroyChild will now call Widget.destroy on children created by a Template when the Widget is accessible by element.$controller.

Container.createChild now sets Widget.parent property when the Widget is created by a Template.

If the Widget is set as the destination for all of its BindingHandlers, Widget.destroy will property call BindingHandler.destroy.