[
https://issues.apache.org/jira/browse/FLEX-35030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15218248#comment-15218248
]
mta commented on FLEX-35030:
----------------------------
Hi,
This is the time of the creation of my component but I do not know where
exactly.
The null pointer is occured in SDK function :
public function getStyle(styleProp:String):*
{
// If a moduleFactory has not be set yet, first check for any deferred
// styles. If there are no deferred styles or the styleProp is not in
// the deferred styles, the look in the proto chain.
if (!moduleFactory)
{
if (deferredSetStyles && deferredSetStyles[styleProp] !== undefined)
return deferredSetStyles[styleProp];
}
return styleManager.inheritingStyles[styleProp] ?
_inheritingStyles[styleProp] :
_nonInheritingStyles[styleProp]; ====================> here
there was the null mointer exception
}
And in my case , there is my values :
styleProp = "horizontalCenter"
_inheritingStyles[styleProp] = ""
_nonInheritingStyles = null ===> so,
_nonInheritingStyles[styleProp] ====> nul pointer exception
> Null Pointer Exception in custom component's getStyle
> -----------------------------------------------------
>
> Key: FLEX-35030
> URL: https://issues.apache.org/jira/browse/FLEX-35030
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: Group
> Affects Versions: Apache Flex 4.12.0
> Environment: FLASHBUILDER 4.6
> Reporter: mta
>
> I have 2 widgets in two separate packages. The two widgets are alike.
> They consist of BorderContainer, VGROUP, HGROUP and label.
> I throw teh first one, it ok. But when i throx he second one, i had a nul
> pointer exception.
> Stack trace is :
> at
> mx.core::UIComponent/getStyle()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/core/UIComponent.as:11660]
> at
> mx.core::UIComponent/getConstraintValue()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/core/UIComponent.as:9615]
> at mx.core::UIComponent/get
> horizontalCenter()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/core/UIComponent.as:9784]
> at
> spark.layouts::BasicLayout/measure()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/layouts/BasicLayout.as:261]
> at
> spark.components.supportClasses::GroupBase/measure()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as:1156]
> at
> mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/core/UIComponent.as:9038]
> at
> mx.core::UIComponent/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/core/UIComponent.as:8962]
> at
> spark.components::Group/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/Group.as:1074]
> at
> mx.managers::LayoutManager/validateSize()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:673]
> at
> mx.managers::LayoutManager/doPhasedInstantiation()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:800]
> at
> mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)