builder.html.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 26 May 2010 06:54:57 +0000 (14:54 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 26 May 2010 06:54:57 +0000 (14:54 +0800)
builder.html.js

index bab253e..8717d53 100644 (file)
@@ -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 || {};