Builder/Provider/File/Roo.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 05:21:28 +0000 (13:21 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 05:21:28 +0000 (13:21 +0800)
Builder/Provider/File/Roo.js

index 5aa33d3..105c661 100755 (executable)
@@ -230,14 +230,18 @@ Roo = XObject.define(
         {
             // dump the file tree back out to a string.
             
-            if (typeof(this.items[0]['|module']) != 'undefined') {
-                return this.toSourceStdClass();
+            // we have 2 types = dialogs and components
+            // 
+            var top = this.guessType(this.items[0]);
+            if (top.match(/Dialog/) {
+                return this.toSourceDialog();
             }
+            return this.toSourceLayout();
             
-            if (this.items[0].region) {
-                return this.toSourceLayout();
-            }
-            return this.toSourceDialog();
+            /*
+            eventually support 'classes??'
+             return this.toSourceStdClass();
+            */
               
         },