Dear Ptolemy-hackers,
I am trying to use the FilePortParameter and I had some problem, When I call a asFile() on an FilePortParameter which has not been used by the user I get a nullPointerException, while in the doc it says that it should return null. My guess is that there is a bug in the and the following patch fixes my problem.

[EMAIL PROTECTED]:~/projects/opal/kepler/ptII$ svn diff ptolemy/actor/parameters/ Index: ptolemy/actor/parameters/
--- ptolemy/actor/parameters/     (revision 49987)
+++ ptolemy/actor/parameters/     (working copy)
@@ -277,6 +277,7 @@

        try {
            File file = FileUtilities.nameToFile(name, getBaseDirectory());
+            if ( file == null ) return null;

            if ((file.toString().indexOf("!/") != -1)
                    || (file.toString().indexOf("!\\") != -1)) {

Please let me know if I am wrong or I am missing something,

Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to