Changeset 69

Show
Ignore:
Timestamp:
07/22/08 07:09:11 (2 months ago)
Author:
bi..@lilyapp.org
Message:

fix a bug where path & parentPath commands on thispatch would throw an error if the patch was not saved.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lily/lily/chrome/content/externals/thispatch.js

    r1 r69  
    8787        this.inlet1["path"]=function() { 
    8888                var file = doCommand("getPatchFile()"); 
    89                 if(file.exists()) { 
     89                if(file && file.exists()) { 
    9090                        thisPtr.outlet1.doOutlet(file.path);     
     91                } else { 
     92                        thisPtr.outlet1.doOutlet("bang"); 
    9193                } 
    9294        } 
     
    9496        this.inlet1["parentPath"]=function() { 
    9597                var file = doCommand("getPatchDir()"); 
    96                 if(file.exists()) { 
     98                if(file && file.exists()) { 
    9799                        thisPtr.outlet1.doOutlet(file.path);     
     100                } else { 
     101                        thisPtr.outlet1.doOutlet("bang"); 
    98102                } 
    99103        }