[
https://issues.apache.org/jira/browse/FLEX-34118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14032474#comment-14032474
]
Stephan Plath commented on FLEX-34118:
--------------------------------------
Workaround: include the desired chart components in the main (shell)
application:
{code}
private var dummyChart: LineChart;
private var dummySeries: LineSeries;
{code}
> CartesianChart null pointer
> ---------------------------
>
> Key: FLEX-34118
> URL: https://issues.apache.org/jira/browse/FLEX-34118
> Project: Apache Flex
> Issue Type: Bug
> Components: Charts
> Affects Versions: Apache Flex 4.11.0, Apache Flex 4.12.0, Apache Flex
> 4.12.1
> Reporter: Alexander Mazuruk
>
> The issues is related to individual styleManager per each IFlexModuleFactory
> instance. Say, we have a modular application, having
> Main "shell" which is <s:Application/> tag and modules loaded in runtime into
> this shell. Each individual .swf module has it's own styleManager in it.
> Shell application is linked SDK as RSL's. Same goes for a module, each module
> doesn't have sdk linked into it's .swf body.
> So the issue is when you have default chart styles stuff declared in the main
> shell module and shell.styleManager has those selectors at runtime.
> But when you loading external module having any chart in it it's
> module.styleManager doesn't have any chart style selectors, unless you
> manually
> set "module.moduleFactory = shellApplication.moduleFactory".
> Once again, instantiate external module .swf get a visual chart component out
> of this module add it to the shell stage, and bump! you've got an this trace
> stack:
> TypeError: Error #1010: A term is undefined and has no properties.
> at
> mx.charts.chartClasses::CartesianChart/commitProperties()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as:922]
> at
> mx.core::UIComponent/validateProperties()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/core/UIComponent.as:8482]
> at
> mx.managers::LayoutManager/validateProperties()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:605]
> at
> mx.managers::LayoutManager/doPhasedInstantiation()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:821]
> at
> mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188]
> So the root cause is a heavy chart components dependency on default styles.
> Those default styles are not accessible withing external module loaded in
> runtime.
--
This message was sent by Atlassian JIRA
(v6.2#6252)