Skip navigation
rgartlan
Currently Being Moderated

Strange CS Extension console error

Sep 6, 2012 6:01 AM

Hi,

I have a CS Extension for InDesign CS5.5 (Extension Builder 1.5), and now (after installing CS6 but later uninstalling it -- that's another story) I'm seeing a lot of messages like this in my Eclipse console window:

 

[INFO] CSAWLib.CSLogger TypeConUtils.getAnyPossibleClassDefinitionFor() Failed to find any class definition for com.adobe.indesign::Array

 

Sometimes it's for the Array type, sometimes for File.  There's a LOT of these messages showing up, and I would like to find what happened at snuff this out.

 

Any ideas?  This seems directly related to my aborted attempt to get onto CS6, but I can't find anywhere in my own code that I could be calling into the named function.

 

Cheers,

- Rich

 
Replies
  • Currently Being Moderated
    Sep 6, 2012 6:06 AM   in reply to rgartlan

    Not sure if this can help but I get erratic errors in Flash Builder with similar messages ( lack of definition for common classes), I have to use Project - Clean to solve this issue.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 6, 2012 9:20 AM   in reply to rgartlan

    For some reason, your compiler seems to think that Array and File are InDesign obejcts. Is it possible you have a bad import?

     

    Which swcs are you using for your project?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 11:39 AM   in reply to rgartlan

    Ah!

     

    Let me guess: You're trying to execute ActionScript code in a doScript. Right?

     

    You can only use ExtendScript, AppleScript or Visual Basic in a doScript

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 1:00 PM   in reply to rgartlan

    How are you creating the string for the doScript?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 2:15 PM   in reply to rgartlan

    Hmm. Without seeing more code, I have no more ideas...

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 17, 2012 4:27 PM   in reply to Harbs.

    This is happening to me too.  I'm a CS Extension Builder n00b.  I just downloaded 2.0 today, and created an extension targeting Flash Pro CS6, using Flash Builder 4.6.  I get lots of these warnings:

    [INFO] CSAWLib.CSLogger TypeConUtils.getAnyPossibleClassDefinitionFor() Failed to find any class definition for com.adobe.flashpro::Array

    But eventually, I get a similar error that prevents any further progress:

    [ERROR] CSAWLib.CSLogger CSHostObject.hostGet() failed on elements -  with msg: Failed to find any class definition for com.adobe.flashpro::SymbolInstance

    I was just exploring down into a MovieClip timeline.  I haven't changed any project settings since it was setup.  Here's the code:

    package 
    {
         import com.adobe.csawlib.flashpro.FlashPro;
         import com.adobe.flashpro.*;
         
         public class ExportFlashPro
         {
              public static function run():void 
              {
                   var app:Flash = FlashPro.app;
                   var doc:Document = app.getDocumentDOM();
                   if( doc == null )
                   {
                        app.outputPanel.trace( "No document opened." );
                        return;
                   }
                   
                   var timeline:Timeline = doc.getTimeline();
                   for( var f:int=0; f=timeline.frameCount; ++f )
                   {
                        for( var l:int=timeline.layerCount-1; l>=0; --l )   // Loop backwards, back to front.
                        {
                             var layer:Layer = timeline.layers[ l ] as Layer;
                             if( layer.layerType != "normal" )
                                  continue;
                             if( layer.frameCount < f )
                                  continue;     // This layer doesn't go that far.
                             
                             var frame:Frame = layer.frames[ f ] as Frame;
                             if( frame.elements )
                             {
                                  var elementCount:int = frame.elements.length;
                                  for( var e:int=elementCount-1; e>=0; --e )     // Loop backwards, back to front.
                                  {
                                       var element:Element = frame.elements[ e ];
                                  }
                             }
                        }
                   }               
              }
         }
    }
     
    |
    Mark as:
  • Currently Being Moderated
    Sep 18, 2012 7:18 AM   in reply to Shane Smit

    Hi everyone,

     

    This is a known issue in the CSAW libraries. The warnings regarding the missing definition of Array can be safely ignored.

     

    For other cases, such as trying to iterate through the elements in a frame in Flash, you can define an unused variable of that type to provide a definition to get around this problem. For example, in Shane's case, you can do this:

     

    var unused:SymbolInstance = null;
    

     

    This would trigger the relevant CSAW library to find the class definition of SymbolInstance, therefore any subsequent methods that use it will work fine as expected.

     

    Hope that helps and sorry for any inconvenience caused.

     

    Joe

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 18, 2012 8:53 AM   in reply to Joe Tam

    Thanks Joe.  Adding the unused SymbolInstance reference got it working.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points