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

Provide an easier and more obvious way for developers to register class aliases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows 7
      Language Found: English

    Description

      Persistence used to work properly when you register class aliases on application initialize. But there was a change and registerClassAlias should now be called by overriding set persistNavigatorState for persistence to work correctly.

      This does not look to be very obvious way of registering custom objects and it's easy to run into runtime errors when a custom object is not registered correctly (see SDK-29397)

      Below are steps to reproduce an error when registerClassAlias is called on pre-initialize
      Steps to reproduce:
      1. Import Test project
      2. Click on Button and see the title change.
      3. Close project and reopen to validate persistence.
      4. Error in persistence or casting of data to object.

      Actual Results:
      RTE

      Expected Results:
      Data persisted.

      Workaround (if any):
      Add the following method to the application:

      override public function set persistNavigatorState(value:Boolean):void
      {
      registerClassAlias("valueObjects.Employee", Employee);
      super.persistNavigatorState = value;
      }

      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: