Flex 3值感知组合框错误

时间:2012-09-05 09:19:15

标签: actionscript-3 flex combobox flex3

我正在使用值感知组合框,它工作正常,但最近我开始得到以下错误,当我尝试点击组合框,并且错误是随机的。 我不确定是因为我在编码方面做了哪些更改,或者数据提供商的某些更改等任何帮助都表示赞赏......

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.controls::ComboBox/destroyDropdown()
    at mx.controls::ComboBox/styleChanged()
    at mx.core::UIComponent/setBorderColorForErrorString()
    at mx.core::UIComponent/commitProperties()
    at mx.controls::ComboBase/commitProperties()
    at mx.controls::ComboBox/commitProperties()
    at custom.controls::ComboBox/commitProperties()[D:\workspace\eclipse\indigo\ams\flex_src\custom\controls\ComboBox.mxml:13]
    at mx.core::UIComponent/validateProperties()
    at mx.managers::LayoutManager/validateProperties()
    at mx.managers::LayoutManager/doPhasedInstantiation()

调试器抛出

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.controls::ComboBox/destroyDropdown()
    at mx.controls::ComboBox/styleChanged()
    at mx.core::UIComponent/setBorderColorForErrorString()
    at mx.core::UIComponent/commitProperties()
    at mx.controls::ComboBase/commitProperties()
    at mx.controls::ComboBox/commitProperties()
    at custom.controls::ComboBox/commitProperties()[D:\workspace\eclipse\indigo\ams\flex_src\custom\controls\ComboBox.mxml:13]
    at mx.core::UIComponent/validateProperties()
    at mx.managers::LayoutManager/validateProperties()
    at mx.managers::LayoutManager/doPhasedInstantiation()
    at mx.managers::LayoutManager/validateNow()
    at mx.controls::ComboBox/displayDropdown()
    at mx.controls::ComboBox/downArrowButton_buttonDownHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::buttonPressed()
    at mx.controls::Button/mouseDownHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.controls::ComboBase/textInput_mouseEventHandler()

这是我的代码部分

[Bindable]
 private var networkExpObj:NetworkExpansion=new NetworkExpansion();
[Bindable]
 public var codeDescpResult:Object;
    <mx:FormItem label="Status"
                         required="true">
                <controls:ComboBox id="NWEXP_STATUS_ID"
                                   disabledColor="0x000000"
                                   maxWidth="150"
                                   change="validateUs()"
                                   selectedValue="{networkExpObj.NWEXP_STATUS_ID}"
                                   dataProvider="{codeDescpResult.SRV_NWE_STATUS}"/>
            </mx:FormItem>

1 个答案:

答案 0 :(得分:0)

Apache Flex 4.10中已修复的问题(尚未发布)请参阅https://issues.apache.org/jira/browse/FLEX-33382

如果使用较旧的SDK,您可以修补mx:ComboBox,如此添加“&amp;&amp; tween”检查:

private function destroyDropdown():void
{
    if (inTween && tween)
        tween.endTween();

    displayDropdown(false, null, false);
}