Pman.Builder.Tree.js
[Pman.Builder] / Pman.Tab.BuilderProps.js
index 5482111..ceb9282 100644 (file)
@@ -86,7 +86,7 @@ Pman.Tab.BuilderProps = new Roo.XComponent({
                         } else { 
                            ec[id] = v;
                         }
-                        
+                    
                         _this.grid.setSourceFromNode(ec);
                         
                         var bp = Pman.Tab.BuilderView.panel;
@@ -178,8 +178,11 @@ Pman.Tab.BuilderProps = new Roo.XComponent({
                                  if (n == 'xtype') {
                                     return;
                                  }
+                                  if (n[0] == '!') {
+                                    Roo.MesssageBox.alert("Error", "Error, you can not do this to listeners");
+                                    return;
+                                }
                                  if (n[0] == '|') {
-                                 
                                     var val =  _this.grid.currentNode.elConfig[n];
                                     delete _this.grid.currentNode.elConfig[n];
                                     _this.grid.currentNode.elConfig[ n.substring(1)] = val;
@@ -218,7 +221,13 @@ Pman.Tab.BuilderProps = new Roo.XComponent({
                                     return;
                                 }
                                 if (n[0] == '!') {
-                                    delete _this.grid.currentNode.elConfig.listeners[n.substring(1)];
+                                    try{
+                                        delete _this.grid.currentNode.elConfig.listeners[n.substring(1)]; 
+                                    }catch(err){
+                                        delete _this.grid.currentNode.elConfig[n];
+                                        Roo.log(err);
+                                    }
+                                    
                                 } else {
                                     delete _this.grid.currentNode.elConfig[n];
                                 }
@@ -250,6 +259,7 @@ Pman.Tab.BuilderProps = new Roo.XComponent({
                                 // show a dialog to select property??
                                 // or should we add a line and get clever with pulldowns..
                                 var ec = _this.grid.currentNode.elConfig;
+                            
                                 Pman.Dialog.BuilderProp.show({
                                         xtype : ec.xtype  || '',
                                         xns: ec['|xns'] || '',