From: Alan Knowles Date: Wed, 26 May 2010 06:54:57 +0000 (+0800) Subject: builder.html.js X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=ae1b95f74cf52f7461d64b4defc569f5d1a65e05 builder.html.js --- diff --git a/builder.html.js b/builder.html.js index bab253e37..8717d5359 100644 --- a/builder.html.js +++ b/builder.html.js @@ -184,7 +184,9 @@ Builder = { // alert(cfg[p]); // } - } catch(e) { console.log('Error evaluating: ' + cfg[p] + "\r\n" + JSON.stringify(e)); }; + } catch(e) { + console.log('Error evaluating: ' + cfg[p] + "\r\n" + JSON.stringify(e)); + }; delete cfg[p]; @@ -199,6 +201,19 @@ Builder = { } + if (cfg.xtype && cfg.xtype.match(/^Roo\./) && !cfg.xns) { + // xtype contains full path.. + var bits = cfg.xtype.split('.'); + bits.shift(); // remove roo.. + cfg.xtype = bits.pop(); // get the last bit.. + cfg.xns = Roo; + while (bits.length) { + cfg.xns = cfg.xns[bits.shift()]; + } + + + } + // we can overlay some event handlers here.. cfg.listeners = cfg.listeners || {};