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

state-dependant datagrid inside module, itemRenderer does not access parentDocument consistantly

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Apache Flex 4.11.0
    • None
    • None
    • Windows Vista

    Description

      myDataGrid is inside myModule.
      myDataGrid displays according to a state, and has an itemRenderer in it.

      The itemRenderer is attempting to access a var in myDataGrid like so:
      this.grid.dataGrid.parentDocument.myVar

      The datagrid displays correctly when the state is entered for the first time. But consecutive times the state is re-entered, flash player locks up.
      This is because ...parentDocument is referencing the Module class instead of myModule.

      Work around:

      var _parent:DisplayObjectContainer = this.grid.dataGrid.parent;
      var _myVar:MyVar
      while (_parent != this.parentApplication)
      {
      if (_parent.hasOwnProperty("myVar"))

      { _myVar= _parent["myVar"]; break; }

      else _parent = _parent.parent;
      }

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            jetspice Jeff Spicer

            Dates

              Created:
              Updated:

              Slack

                Issue deployment