You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Jeff Spicer (JIRA)" <ji...@apache.org> on 2013/12/27 23:40:50 UTC
[jira] [Created] (FLEX-34018) state-dependant datagrid inside
module, itemRenderer does not access parentDocument consistantly
Jeff Spicer created FLEX-34018:
----------------------------------
Summary: state-dependant datagrid inside module, itemRenderer does not access parentDocument consistantly
Key: FLEX-34018
URL: https://issues.apache.org/jira/browse/FLEX-34018
Project: Apache Flex
Issue Type: Bug
Components: Cell Renderers, Modules, Spark: DataGrid, States
Affects Versions: Apache Flex 4.11.0
Environment: Windows Vista
Reporter: Jeff Spicer
Priority: Minor
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;
}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)