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

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

    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

          People

            Unassigned Unassigned
            jetspice Jeff Spicer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: