Builder/DialogNewComponent.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 11:21:36 +0000 (19:21 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 11:21:36 +0000 (19:21 +0800)
Builder/DialogNewComponent.js

index 606fe0d..22f2fec 100644 (file)
@@ -31,7 +31,7 @@ DialogNewComponent=new XObject({
                 }
                 var isNew = this.file.name.length ? false : true;
                 
-                if (this.file.name.length && this.file.name != this.get('name').el.get_text().length ) {
+                if (this.file.name.length && this.file.name != this.get('name').el.get_text()) {
                     this.get('/StandardErrorDialog').show(
                         "Sorry changing names does not work yet. "
                     );
@@ -43,7 +43,7 @@ DialogNewComponent=new XObject({
                 }
                
                 if (!isNew) {
-                    file.save();
+                    this.file.save();
                     this.el.hide();
                     return;
                 }