4 Replies Latest reply: Apr 23, 2012 2:48 PM by Harbs. RSS

    Why does com.adobe.indesign.Document.filePath/fullName always return null since CS5.5?

    Scarlett Penn

      The CS InDesign plugin on MacOS Snow Leopard/Lion worked fine with Adobe InDesign CS5. The properties: filePath and fullName retrieved the document's path as expected.

       

      Since upgrading to InDesign CS5.5 (tried 7.5 and 7.5.2) the fullName and filePath properties in

      com.adobe.indesign.Document object always return null.

       

      I don't see if these read-only propeties are deprecated and if so what is the alternative?

       

      It seems like a CSSDk's InDesign ActionScript host adapter has a bug?

       

      Any insights are welcomed.

        • 1. Re: Why does com.adobe.indesign.Document.filePath/fullName always return null since CS5.5?
          tbd2

          This appears to be a pretty obvious bug. Hard to believe it could have passed QA :-)

           

          I have been able to reproduce this in a tiny test case using the Extension Builder 1.5, the default code generated for InDesign plugin exhibits the bug.

          To reproduce open an Indesign document and then click on the plugin run button.

           

          Can someone from Adobe please comment on this bug in CS5.5 InDesign SDK or CSAW lib? Can we expect a fix anytime soon?

           

          package com.inddtest

          {

                    import com.adobe.csawlib.indesign.InDesign;

                    import com.adobe.indesign.*;

                    import flash.filesystem.File;

                    import flash.system.System;

           

                    public class InDesignDocPathTestInDesign

                    {

                              public static function run():void

                              {

                                        var app:Application = InDesign.app;

           

                                        //your InDesign code here

                                        if (app.activeDocument!=null) {   // I added these lines to the default plugin generated by extension builder to reproduce the bug

                                                  var s:File = app.activeDocument.fullName;

                                                  var f:File = app.activeDocument.filePath;

                                                  if (!s || !f) {

                                                            trace("fullName and filePath are null!!");

                                                  }

                                        }


          • 3. Re: Why does com.adobe.indesign.Document.filePath/fullName always return null since CS5.5?
            tbd2 Community Member

            Thanks Harbs. Yes that worked.

             

            Strange, the file was opened from the desktop but was an older Indd file, it was probably converted to new cs5.5 format on opening and was marked as changed/not-save dby cs5.5 indesign. I was expecting the file name to be non null since the file had a valid path/name to begin with. After save it worked fine but

            I would still think its a bug to not report the file name/path if it was opened from desktop.

            • 4. Re: Why does com.adobe.indesign.Document.filePath/fullName always return null since CS5.5?
              Harbs. Community Member

              Nope. It's not a bug.

               

              Converted files are not saved. If they would be, you could save over the previous version by mistake. That would be a bad thing! (InDesign files are not backwards compatible.)

               

              Always check Document.saved == true before checking the path...

               

              Harbs