Я пытался получить доступ к сетке данных во время выполнения и хочу присвоить ей данные вроде
открытая функция getGridData (reportsArray: ArrayCollection): void {
reportData = reportsArray;
trace(" The length of the datagrid is "+reportData.length);
graphDataGrid.dataProvider = reportData;
invalidateDisplayList();
}
но я получаю эту ошибку
TypeError: Ошибка # 1009: Невозможно получить доступ к свойству или методу пустой ссылки на объект.
at views.charts :: ComparisonAnalysis / createDataGrid () [C: \ FlexProjects \ AdvancedMetering \ views \ charts \ ComparisonAnalysis.mxml: 32]
at views.charts :: ComparisonAnalysis / getGridData () [C: \ FlexProjects \ AdvancedMetering \ views \ charts \ ComparisonAnalysis.mxml: 26]
at components.CustomReport :: CustomReportSelector / getResultHandler () [C: \ FlexProjects \ AdvancedMetering \ components \ CustomReport \ CustomReportSelector.mxml: 147]
at components.CustomReport :: CustomReportSelector / __ reportsBase_dataGridResultChanged () [C: \ FlexProjects \ AdvancedMetering \ components \ CustomReport \ CustomReportSelector.mxml: 203]
на flash.events::EventDispatcher/dispatchEventFunction ()
на flash.events::EventDispatcher/dispatchEvent ()
в mx.core :: UIComponent / dispatchEvent () [C: \ autobuild \ 3.2.0 \ frameworks \ projects \ framework \ src \ mx \ core \ UIComponent.as: 9298]
at components.CustomReport :: ReportingBase / getDataFromServer () [C: \ FlexProjects \ AdvancedMetering \ components \ CustomReport \ ReportingBase.as: 98]
at components.CustomReport :: ReportingBase / getResults () [C: \ FlexProjects \ AdvancedMetering \ components \ CustomReport \ ReportingBase.as: 78]
at components.CustomReport :: CustomReportSelector / getGraphData () [C: \ FlexProjects \ AdvancedMetering \ components \ CustomReport \ CustomReportScripts.as: 20]
at components.CustomReport :: CustomReportSelector / __ getGraphandGridData_click () [C: \ FlexProjects \ AdvancedMetering \ components \ CustomReport \ CustomReportSelector.mxml: 248]
Может кто-нибудь, пожалуйста, дайте мне знать, в чем проблема, по-видимому, в данный момент времени решается проблема с сеткой данных
Sudee [