1 Reply Latest reply on Feb 8, 2010 10:58 PM by m_puns

    Unloading modules using Parsley and the Cairngorm 3 Module Library

    Karl_Sigiscar_1971 Level 3


      We are using Parsley and Cairngorm 3 to declare and load modules in our Flex application.

      Currently, the link [How to use the Cairngorm Module library] of the Module Library - beta section is empty.
      http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm+Libraries#CairngormLibraries- Module

      We have been able to figure out a lot of things with the sample A Modular Sample Application Explained:


      However, the topic of unloading modules is not covered.


      The only hints I got so far are from the SVN source of the library:


      http://opensource.adobe.com/svn/opensource/cairngorm3/trunk/libraries/Module/src/com/adobe /cairngorm/module/IUnloadPolicy.as


      http://opensource.adobe.com/svn/opensource/cairngorm3/tags/cairngorm-3.0.2/libraries/Modul e/src/com/adobe/cairngorm/module/ViewLoader.as

      Could someone explain what are the instructions in the API to unload modules and dispose of their corresponding context ?

      Here is a sample of the code we are using:

      <?xml version="1.0" encoding="utf-8"?>
      <module:ViewLoader xmlns:module="com.adobe.cairngorm.module.*"
                         progress="message = 'Loading: ' + event.bytesLoaded + ' of ' + event.bytesTotal"
                         error="message = event.errorText"
                         addedToStage="dispatchEvent( new Event( 'configureIOC', true ) )">


                  public var message:String;

              <mx:Label text="{ message }"/>
              <mx:Label color="0xFF0000"
                        text="{ message }"/>


      Best  regards,
      Karl Sigiscar.