Announcement Announcement Module
No announcement yet.
Error: Type was not found or was not a compile-time constant Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error: Type was not found or was not a compile-time constant

    Since there are no installation instructions and I am therefore winging it, I am surprised that I only have these errors when I try to Debug As using the FDT plug-in in STS.
    My code does not show any errors in the log. I had things working before I started to try to add Spring to the mix and added some classes.

    We use Spring for Java development and love it. We are getting back to Actionscript and are looking forward to getting Spring to help us.

    This error is not helpful but looks like multiples of the same problem. There are lots more lines like these.

    What have I forgot to do?


    Error: Type was not found or was not a compile-time constant: MetaData.


    Error: Type was not found or was not a compile-time constant: Field.


    Error: Type was not found or was not a compile-time constant: ILogger.

    Thanks for any help and for getting Spring going for ActionScript.

  • #2
    Read documenatation

    Please read this


    • #3
      I read this earlier but I am having trouble guessing which of the many ideas in that section actually pertains to my problem.

      A direct reference would be appreciated.

      I don't understand why the Spring code is complaining when my code seems to compile OK. I though that this section was about how to force my Spring configured classes to be considered part of the project.

      Are there any instructions about installing the Spring ActionScript in STS and setting up an ActionScript project? I have the FDT plug-in which I guess is a bit outside the Springsource bailliwick but I would expect that it is not a problem.

      This is really slowing down my progress since I can not test anything that I write.

      Thanks for the help.


      • #4
        Flex compiler

        To the best of my knowledge, flex compiler is smart to include only files that it see are are necessary or referenced in the application. Apparently, spring actionscript configuration outside it's view as it is unaware of any frameworks and its configuration.
        As the link describes, you could follow any of the alternatives, depending on your choice.

        Also did you include as3commons_*.swc files found in actionscript 'lib' folder.?They are referenced by spring-actionscript-core-1.0RC1.swc


        • #5
          Thanks for the quick reply.

          I did download as3-commons.

          I guess that I do not understand the Flex "compilation" process or how Spring is packaged.
          I made a lib folder in my STS project. In that, I stuck
          spring-actionscript-core-1.0RC1.swc and

          In my FDT build path I added these 4 swc files to the library tab.

          From the error message, it seems to find the Spring swc and is trying to do something with it but can not find definitions for ILogger, Field and MetaData. These are not mine and I am not sure why spring-actionscript-core-1.0RC1.swc(org/springextensions/actionscript/ioc/autowire/DefaultAutowireProcessor) would be referring to something that is not available.

          Am I missing another swc file?
          I have doubts that I am supposed to include some reference to a class that is not mine in order to get Spring to compile. I would have thought that the Spring swc is complete.

          Unfortunately, I am coming to this with a Spring/Java/STS background and some AS1 and AS2 development from a few (6-8) years ago and trying to figure out the Flex part which is probably a different profile than the other people adding Spring to their Flex/AS3 expertise. I can clearly miss something that everyone else will find elementary.

          Thanks for your help and patience.


          • #6
            I tried the first 2 suggestions in "Forcing Actionscript class inclusion".
            No affect on the build.

            I am using STS and FDT so I couldn't try the FlexBuilder stuff.

            Any ideas why the Spring code would not be including imports for classes that it seems to need?

            Does anyone have an installation procedure or a sample FDT project that uses Spring?


            • #7
              Type was not found - solved

              It was the as3commons that was missing.
              I only had 1 of the libraries and I guess one needs all of them.

              Thanks for all the help.
              I am sure that I will be able to use some of the information given here in solving later problems.

              Is anyone writing an installation chapter for the documentation?


              • #8
                Hey Ron,

                sorry for being late with replying (holidays and all), I'm glad to see you've managed to get up and running.
                As for an installation manual, having two links on the main page, one with and one without dependencies, seemed to us like more than enough, but I'll see if I can make it a bit clearer though.
                If there's any other issues, please drop us a line.




                • #9
                  Thanks for the reply.
                  What I would hope to see in the download page, at a minimum, is as follows:
                  It is recommended that you download the archive "with dependencies".
                  If you do not, you will have to provide the following libraries:
                  - as3commons-reflect
                  - as3common-lang
                  - the rest of the list.

                  Once you have downloaded the files, they need to be installed in a permanent library location.
                  You need to inform your IDE that you want these libraries included in search path for the compiler and build.
                  See the section below that pertains to your IDE for the details in setting up a project using Spring Actionscript.


                  Somewhere there should be a section for each of the major IDE's that you support.

                  I have put the outline for that in my reply to the problem that I am having getting the context file loaded.

                  It would be instructive, both for the user and the documentation authors, to have a short description of the knowledge that you expect people reading the Spring Actionscript documentation to have before attempting to use the Spring Actionscript tools.
                  This would let authors know what they have to write and what they can omit since the reasder is assumed to already know this material.

                  It would tell readers whether they were ready for Spring Actionscript and hopefully give some references to other documentation that they may need in order to follow the discussion.

                  Keep up the good work, I am a big fan of the Spring approach in general.
                  It has helped a lot with our Java projects.
                  I hope to get it integrated with our Actionscript development.



                  • #10
                    Hi Ron,

                    thanks for your feedback. May I ask you to create issues in Jira for the improvement(s) you mention?


                    Many thanks.