Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-26053

ModuleManager missing ModuleEvent.READY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK Previous
    • None
    • Modules
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1.

      this.moduleInfo = ModuleManager.getModule( pluginData.source );
      this.moduleInfo.addEventListener( ModuleEvent.READY, this.onModuleLoaded, false, 0, true );
      this.moduleInfo.load( null, null, null, this.application.moduleFactory );

      // ...

      protected function onModuleLoaded( event:ModuleEvent ) :void
      {
      trace( this + ".onModuleLoaded() type: " + event.type );
      }

      2.Relevant Code in the Flex Framework

      mx.modules.ModuleManager.as
      nested class ModuleInfo

      // ...

      public function completeHandler(event:Event):void
      {
      //trace("child load of " + _url + " is complete");

      var moduleEvent:ModuleEvent = new ModuleEvent(
      ModuleEvent.PROGRESS, event.bubbles, event.cancelable);
      moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
      moduleEvent.bytesTotal = loader.contentLoaderInfo.bytesTotal;
      dispatchEvent(moduleEvent);
      }

      // ...

      Actual Results:

      • The Event is never been dispatched.

      Expected Results:

      • retrieve the ModuleEvent.READY event if the Module is complet loaded.

      Workaround (if any):

      var info:IModuleInfo = ModuleManager.getModule( pluginData.source );
      info.addEventListener( ModuleEvent.PROGRESS, this.onModuleLoadProgress, false, 0, true );
      info.addEventListener( ModuleEvent.READY, this.onModuleLoaded, false, 0, true );
      info.load( null, null, null, this.application.moduleFactory );

      // ...

      protected function onModuleLoaded( event:ModuleEvent ) :void
      {
      trace( this + ".onModuleLoaded() type: " + event.type );
      }

      protected function onModuleLoadProgress( event:ModuleEvent ) :void
      {
      trace( this + ".onModuleLoadProgress() type: " + event.type );

      if ( event.bytesLoaded >= event.bytesTotal )

      { var readyEvent:ModuleEvent = new ModuleEvent( ModuleEvent.READY, event.bubbles, event.cancelable, event.bytesLoaded, event.bytesTotal, event.errorText, event.module ); this.onModuleLoaded( readyEvent ); }

      }

      // ...

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: