4c1fa27a02b96951513144e03e22e6fa9ab98e7e
[blerg.git] / www / jssrc / blerg / Main.js
1 enyo.kind({
2         name: "blerg.Main",
3         kind: "Control",
4         classes: "blerg-main",
5         currentView: null,
6         updateView: function(objdef) {
7                 if (!this.currentView || objdef.kind != this.currentView.kind) {
8                         this.destroyComponents();
9                         this.currentView = this.createComponent(objdef);
10                         this.currentView.render();
11                 } else {
12                         for (var i in objdef)
13                                 this.currentView.setProperty(i, objdef[i])
14                 }
15         }
16 });