From: Alan Knowles Date: Fri, 14 May 2010 09:19:44 +0000 (+0800) Subject: XObject.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=6a81a58148c56c7acf8f0e6f0a0ffcac8e47fed1;p=app.Builder.js XObject.js --- diff --git a/XObject.js b/XObject.js index 34051b077..2c8f9669c 100644 --- a/XObject.js +++ b/XObject.js @@ -142,10 +142,12 @@ XObject.prototype = { if (!this.el && typeof(this.xtype) == 'function') { if (XObject.debug) print("func?" + XObject.keys(this.config).join(',')); this.el = this.xtype(this.config); + this.config = []; } if (!this.el && typeof(this.xtype) == 'object') { if (XObject.debug) print("obj?" + XObject.keys(this.config).join(',')); this.el = new (this.xtype)(this.config); + this.config = []; } //print(this.el); if (!this.el && this.xns) { @@ -183,13 +185,12 @@ XObject.prototype = { */ + for (var i in this.config) { - // only write to writable properties - // if (XObject.writeablePropsCache[this.xtype.type].indexOf(i) < 0) { - // continue; - // } + this.el[i] = this.config[i]; } + // register it! //if (o.xnsid && o.id) { // XObject.registry = XObject.registry || { };