Announcement Announcement Module
Collapse
No announcement yet.
SAS, RSL and optimize problems Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SAS, RSL and optimize problems

    Hi List,

    we have some trouble in my project (again...), so let me explain what we are doing.

    First of all we use SpringActionscript 1.2-SNAPSHOT, we build our project using flexmojos 3.6.1, Flex SDK is 4.1.0.x.

    Our project is splitted up into several components. For each component there is a multiproject in which is the component itself and a componentDemo application to view and test the component.

    The complete application shall use RSL for all components, so each component uses the
    Code:
    optimize
    goal provided by flexmojos and the component is used in the componentDemo using the
    Code:
    <scope>rsl</scope>
    .
    In the build process of the componentDemo the optimized component.swf is copied to the rsl like all other dependencies.

    So far our workflow works, component and componentDemo can be built and we have a startable application.

    But there seems to be a problem with SpringActionscript because it seems the depenency injection does not work properly.

    In a concrete example there is a list which is to be filled by a service which is injected by a presentation model to the list. This works if the application is started in Flashbuilder (each dependency in componentDemo to RSL, in component to external) and it works if the component is included NOT using
    Code:
    <scope>rsl</scope>
    .

    Our suspicion is the
    Code:
    optimize
    goal removes a metatag which is needed by SAS. Currently we have this setting:

    Code:
    <keepAs3Metadatas>
    	<keepAs3Metadata>Bindable</keepAs3Metadata>
    	<keepAs3Metadata>Managed</keepAs3Metadata>
    	<keepAs3Metadata>ChangeEvent</keepAs3Metadata>
    	<keepAs3Metadata>NonCommittingChangeEvent</keepAs3Metadata>
    	<keepAs3Metadata>Transient</keepAs3Metadata>
    	<keepAs3Metadata>Events</keepAs3Metadata>
    	<keepAs3Metadata>Autowired</keepAs3Metadata>
    	<keepAs3Metadata>ResourceBundle</keepAs3Metadata>
    	<keepAs3Metadata>Inspectable</keepAs3Metadata>
    	<keepAs3Metadata>EventHandler</keepAs3Metadata>
    	<keepAs3Metadata>Required</keepAs3Metadata>
    </keepAs3Metadatas>
    Is our suspicion correct and we missed a metadata tag?

    If it is helpful I can create a demo project tomorrow.

    Any help is appreciated,
    Christoph

  • #2
    hmmm

    For injection [Autowired] is indeed the only metatag needed.

    You can double check if the metadata is really there by introspecting the specified class using describeType(), dumping the resulting XML and seeing if the metadata is in there or not. If it is then I guess the problem is deeper and in that case we would indeed appreciate a sample application that we can investigate.

    cheers,

    Roland

    Comment


    • #3
      Hi Roland,

      thank you for your reply. describeType() is new to me (how do I use it?), so I decided to create an example project. The behaviour is the same like in our main project.

      The example project is an enhanced version of my moduleUnloader project, you can find it in https://svn.origo.ethz.ch/flex-playg...oduleUnloader/.

      Just check it out, run
      Code:
      mvn install
      in the root folder. After the build process a runnable version can be found in
      Code:
      componentDemo/target/deployment/index.html
      .

      The checked in version works. But it only works because I changed the scope of the dependency baseContainer from rsl to merged.
      If I set the scope to rsl and rebuild the project, dependency injection does not work properly.

      I have absolutely no clue if I missed some compiler settings or if there is a bug anywhere so I would be very glad if you could have a look at the project.

      Thank you in advance,
      Christoph

      Comment


      • #4
        hey there,

        describeType() is a native flash player method, just type it into your IDE and read the documentation on how to use it, its pretty straightforward.

        I'll try and have a look at the demo app later when I find the time.

        cheers,

        Roland

        Comment


        • #5
          Hi Roland,

          thanks for your help. It seems the Autowired metadata is missing so it seems this is an flexmojos issue

          I start researching this, maybe you can give me a hint?

          Regards,
          Christoph

          Comment


          • #6
            sorry...

            Hi,

            sorry, I'm no flex-mojos or maven expert at all, totally the wrong guy to ask
            I suggest you try the flex-mojos mailing list and ask some questions, maybe you're doing something wrong, or maybe its a bug in flex-mojos.
            If you find out please report back though, I'm sure there's other people on the forum who could benefit from your findings.

            Thanks in advance,

            cheers,

            Roland

            Comment


            • #7
              Hi Roland,

              it seems the optimize goal in flexmojos 3.6.1 does not support keep-as3-metadata configuration. flexmojos 3.7.1 and 3.8 seem to have the same lack of functionality.

              In the flexmojos mailing list there currently is one member who want's to contribute to flexmojos to solve this issue in flexmojos 3.8.

              I would like to use flexmojos 3.6.1 so I decided to enhance the optimize goal. I found the place where the compiler is called but I have no clue yet how to get a configuration in.

              Thank you aganin for your help!

              Have a nice weekend,
              Christoph

              Comment


              • #8
                Hi List,

                I patched flexmojos 3.6.1 to keep-as3-metadata even if SWC/SWF is optimized. You can find the path in http://flex-playground.origo.ethz.ch/download.

                Please notice I don't recommend to use this patched version. If you are able to update to flexmojos 3.8 please do so. A future version of 3.8 will contain the keep-as3-metadata feature, too.

                Only use the patch if you have no choice.

                Have a nice weekend,
                Christoph

                Comment


                • #9
                  great!

                  Hey Christoph,

                  thanks a lot for this contribution! And I'm happy you have your project working as well, of course

                  cheers,

                  Roland

                  Comment


                  • #10
                    Originally posted by flex-guse View Post
                    Hi List,

                    I patched flexmojos 3.6.1 to keep-as3-metadata even if SWC/SWF is optimized. You can find the path in http://flex-playground.origo.ethz.ch/download.

                    Please notice I don't recommend to use this patched version. If you are able to update to flexmojos 3.8 please do so. A future version of 3.8 will contain the keep-as3-metadata feature, too.

                    Only use the patch if you have no choice.

                    Have a nice weekend,
                    Christoph
                    Such a very amazing link!
                    __________________
                    Watch Mars Needs Moms Online For Free

                    Comment

                    Working...
                    X