Sample/RooProjectProperties.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 25 May 2010 11:37:46 +0000 (19:37 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 25 May 2010 11:37:46 +0000 (19:37 +0800)
Sample/RooProjectProperties.js

index d9a4fd3..d445362 100644 (file)
@@ -14,7 +14,11 @@ RooProjectProperties=new XObject({
     modal : true,
     show : function() {
         // get the active project.
-        
+        var file = this.get('/Window.LeftTree').getActiveFile();
+        if (!file) {
+            this.get('/StandardErrorDialog').show("No file is currently active");
+            return;
+        }
         var project = this.get('/Window.LeftTree').getActiveFile().project;
         print (project.fn);