2 Replies Latest reply on Sep 25, 2009 12:22 AM by vdelbart

    [RSL] : Two linking libraries




      I have this two libraries :


        [lib1] : Customer.as, CustomerReference (extends of Reference)

        [lib2] : Reference.as


      The link type between : [lib1] -- (external) --> [lib2]


      In my application [Appli1] I need Customer.as (all my libraries are shareable) so I make this link : [Appl1] -- (RSL) --> [lib1]


      But in execution, I have an error because flex doesn't find 'Reference.as' class. Is this normal ? And is there a solution to load only the classes relevant to my application in the Flex VM ?


      For other reason, I need to conserve RSL linkage (need to deploy [lib2]-v2 without compiling [Appli1] and [lib1]).






      PS : this link [Appl1] -- (RSL - second link) --> [lib1]


                            \----- (RSL - first link) --> [lib2]


      works, but it's not intuitive and bringing others problems (size, response time, ...)

        • 1. Re: [RSL] : Two linking libraries
          Darrell Loverin Level 4

          The runtime error is to be expected. When an RSL loads all of the inherited type dependencies must be resolved or the Flash Player will throw a VerifyError. Since Customer extends Reference, Reference is an inherited dependency and must be available.


          As you noticed loading lib2 as an RSL solves the problem.


          The other way to solve the problem (without refactoring the libraries) is to not make lib2 an external library when linking lib1. This will cause lib1 to contain Reference.as.




          1 person found this helpful
          • 2. Re: [RSL] : Two linking libraries
            vdelbart Level 1

            Thanks for your response,


            but with the link : [lib1] -- (merged into code) --> [lib2]. if 'Reference' change I must compile [lib2] and [lib1] and it's not a good solution (in my application, I will have more than 80 libraries).


            Anyway thanks again for your help,


            best regards,