Builder/RightGtkView.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 11 May 2010 08:30:18 +0000 (16:30 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 11 May 2010 08:30:18 +0000 (16:30 +0800)
Builder/RightGtkView.js

index e038e51..6f0b925 100755 (executable)
@@ -248,8 +248,7 @@ RightGtkView = new XObject({
         {
             var keys = [];
             var isArray = false;
-            print(obj.constructor);
-            print(obj.constructor.toString() === Array.toString() ? "ARRAY?" : "-");
+            
             if (obj.constructor.toString() === Array.toString()) {
                 for (var i= 0; i < obj.length; i++) {
                     keys.push(i);
@@ -260,11 +259,24 @@ RightGtkView = new XObject({
                     keys.push(i);
                 }
             }
-    
-            var _this = this;
             var els = [];
+            var skip = [];
+            if (!isArray && 
+                    typeof(obj['|xns']) != 'undefined' &&
+                    typeof(obj['xtype']) != 'undefined'
+                ) {
+                    els.push('xtype: '+ obj['|xns'] + '.' + obj['|xns']);
+                    skip.push('|xns','xtype');
+                }
+            
+            var _this = this;
+            
             keys.forEach(function(i) {
                 var el = obj[i];
+                if (!isArray && skip.index(i) > -1) {
+                    return;
+                }
+                
                 if (typeof(i) == 'string' && i[0] == '|') {
                     // does not hapepnd with arrays..
                     els.push(JSON.stringify(i.substring(1)) + ":" + obj[i]);