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

applicationDomain.getDefinition() returns null for valid class name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 4.1 (Release)
    • None
    • Flash Integration
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Other (specify version)
      Language Found: English

    Description

      applicationDomain.getDefinition() returns null for a valid class name if called from constructor of a class instantiated from static initializer.

      Base class:

      package
      {
      import flash.system.ApplicationDomain;
      import flash.utils.getQualifiedClassName;

      public class RegularAssClassBase
      {
      public var clazz:Class;

      public function RegularAssClassBase()

      { var applicationDomain:ApplicationDomain = ApplicationDomain.currentDomain; var name:String = flash.utils.getQualifiedClassName(this); clazz = applicationDomain.getDefinition(name) as Class; }

      }
      }

      The subclass:

      package
      {
      public class RegularAssClass extends RegularAssClassBase
      {
      public static var RAClass:RegularAssClass;

      { RAClass = new RegularAssClass(); }

      public function RegularAssClass()

      { super(); }

      }
      }

      Expected result: clazz variable set to Object, or Error thrown by constructor

      Actual result: clazz is null, no errors

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: