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

Custom preloader doesn't like reference to mx.core.Application.application

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • Adobe Flex SDK Previous
    • None
    • Preloader
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      Created an application like this
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" preloader="CustomPreloader" />

      CustomPreloader.as looks like this
      package
      {
      import mx.preloaders.DownloadProgressBar;

      public class CustomPreloader extends DownloadProgressBar
      {
      public var wcs:WelcomeScreen;

      public function CustomPreloader()

      { super(); wcs = new WelcomeScreen(); this.addChild(wcs) }

      }
      }

      WelcomeScreen.as looks like this

      package
      {
      import flash.display.Loader;
      import mx.core.Application;

      public class WelcomScreen extends Loader
      {
      public function WelcomScreen()

      { trace(mx.core.Application.application); }

      }
      }

      mx.core.Application.application should be null. But instead i'm getting a RTE.

      Actual Results:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at global$init()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\core\Application.as:210]
      at WelcomScreen()[C:\Documents and Settings\bodrul haque.SYNLOG\My Documents\Flex Builder 3\myTest3\src\WelcomScreen.as:10]
      at CustomPreloader()[C:\Documents and Settings\bodrul haque.SYNLOG\My Documents\Flex Builder 3\myTest3\src\CustomPreloader.as:12]
      at mx.preloaders::Preloader/initialize()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\preloaders\Preloader.as:203]
      at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\managers\SystemManager.as:1505]
      at mx.managers::SystemManager/initHandler()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\managers\SystemManager.as:2206]

      Expected Results:

      I've give a very simplified test to show the problem.
      I'm actually accessing a variabe on mx.core.Application.application but this was good enough to show the problem

      Workaround (if any):

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: