//<script type="text/javascript">
+_this = { } ; // a fake self for rendering.
Builder = {
this.munge(cfg);
- console.log(this.dump(cfg));
+ //console.log(this.dump(cfg));
// we draw either a dialog or a tab..
if (cfg.xtype == 'LayoutDialog') {
for(var p in cfg){
// key is not string?!?!?!!?
+ console.log(p);
if (typeof(p) != 'string') {
continue;
}
// stupid IE can not return objects evaluated..
eval('_tmp =(' + cfg[p] + ')');
cfg[p.substr(1)] = _tmp;
- //if (typeof(_tmp) == 'undefined') {
- // alert(cfg[p]);
- // }
+ if (typeof(_tmp) == 'undefined') {
+ alert(cfg[p]);
+ }
} catch(e) {
console.log('Error evaluating: ' + cfg[p] + "\r\n" + JSON.stringify(e));
}
if (cfg.xtype) {
- if (typeof(cfg.xns[cfg.xtype]) == 'undefined') {
- throw "Invalid Xtype " + this.xtreepath;
+ if (!cfg.xns || typeof(cfg.xns[cfg.xtype]) == 'undefined') {
+ throw "Invalid Xtype " + cfg.xtype + ' on ' + cfg.xtreepath;
}
}