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

mx.core.Application.application Null Error in Gumbo

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • Adobe Flex SDK Previous
    • mx: Application
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Internet Explorer 7.x
      Language Found: English

    Description

      Steps to reproduce:
      1. attach an event listener to creation complete
      2. attempt to access mx.core.Application.application

      Actual Results:
      returns null

      Expected Results:
      an instance of the running Application

      Workaround (if any):
      There is no workaround.

      Notes:
      This causes all flex applications < 4.0 that use Application.application to break.

      on lines #309 of the mx.core.Application class contains:

      return FlexGlobals.topLevelApplication as Application;

      since this line of code is within mx.core.Application it attempts to cast the value of topLevelApplication to the mx.core.Application type... in a Flex 5 Gumbo project, FlexGlobals.topLevelApplication is a spark.components.Application type. This line of code attempts to cast a spark.components.Application to an mx.core.Application resulting in a null value.

      Fix:
      do not cast FlexGlobals.topLevelApplication.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment