14 Replies Latest reply on Oct 19, 2012 10:54 AM by rgartlan

    Strange CS Extension console error

    rgartlan Level 1

      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

        • 1. Re: Strange CS Extension console error
          MSSDedalus Level 1

          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.

          • 2. Re: Strange CS Extension console error
            rgartlan Level 1

            Thanks, but this didn't help.  I didn't rebuild the several libraries my project includes, but then again I hadn't rebuilt them earlier, either.  Might try that when I get a chance -- but at this point I'm still looking for ideas.

            • 3. Re: Strange CS Extension console error
              Harbs. Adobe Community Professional & MVP

              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?

              • 4. Re: Strange CS Extension console error
                rgartlan Level 1

                Not sure, but I do see that the messages seem to occur when my plug-in calls InDesign.app.doScript().

                • 5. Re: Strange CS Extension console error
                  Harbs. Adobe Community Professional & MVP

                  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

                  • 6. Re: Strange CS Extension console error
                    rgartlan Level 1

                    No, I’m telling it to execute some extendscript.  It’s running fine, but throwing these log messages now as it does so.

                    • 7. Re: Strange CS Extension console error
                      Harbs. Adobe Community Professional & MVP

                      How are you creating the string for the doScript?

                      • 8. Re: Strange CS Extension console error
                        rgartlan Level 1

                        Often with something like this:

                         

                         

                         

                        var theScript:String = “//blah blah blah”;

                        • 9. Re: Strange CS Extension console error
                          Harbs. Adobe Community Professional & MVP

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

                          • 10. Re: Strange CS Extension console error
                            Shane Smit Level 1

                            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 ];
                                                          }
                                                     }
                                                }
                                           }               
                                      }
                                 }
                            }
                            • 11. Re: Strange CS Extension console error
                              Joe Tam

                              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

                              • 12. Re: Strange CS Extension console error
                                rgartlan Level 1

                                Thanks Joe.  Is this something new?  My impression is that this began after I’d installed CS6 (which I have since uninstalled).  If this is the case, how do I get (or get back) to a configuration that avoids these messages?    These come in dozens when I run a debug session and really clog up my console window, not to mention the effect this has on performance.

                                 

                                 

                                 

                                -          Rich

                                • 13. Re: Strange CS Extension console error
                                  Shane Smit Level 1

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

                                  • 14. Re: Strange CS Extension console error
                                    rgartlan Level 1

                                    Joe, do you have any thoughts on why this seems to have started happening when I installed CS6?  I uninstalled it and the problem persists, so maybe it’s my imagination.  But something made this problem start out of the blue, and I *really* need to find a way to shut it off.  Ideas?