滚动具有自定义渲染器的mx:Tree的滚动条时出错

时间:2010-08-24 06:26:01

标签: flex tree scroll itemrenderer

我为mx:Tree组件创建了一个自定义多行项目渲染器。重要的是要提到我的项呈示器中有两个UITextField。有时(取决于输入数据)只能显示一个UITextFields,因此当不需要第二个UITextField时,我隐藏它并重新计算项目渲染器的高度。根据我的测试,高度计算得当。

当我滚动树时出现问题。错误文本是:

TypeError: Error #1010: A term is undefined and has no properties.
 at mx.controls::List/adjustVerticalScrollPositionDownward()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\List.as:1042]
 at mx.controls::List/configureScrollBars()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\List.as:987]
 at mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:4394]
 at mx.controls::List/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\List.as:1136]
 at mx.controls::Tree/updateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\Tree.as:1203]
 at mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3962]
 at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:663]
 at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736]
 at mx.managers::LayoutManager/validateNow()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:795]
 at spark.components::Application/resizeHandler()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\Application.as:1215]
 at spark.components::Application/commitProperties()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\Application.as:938]
 at mx.core::UIComponent/validateProperties()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7772]
 at mx.managers::LayoutManager/validateProperties()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:572]
 at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:730]
 at mx.managers::LayoutManager/validateNow()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:795]
 at spark.components::Application/resizeHandler()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\Application.as:1215]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.managers::SystemManager/Stage_resizeHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2971]

我使用受保护的覆盖功能measure()重新计算每个项目的高度。 如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

从3.2.0开始的所有版本都是Flex SDK问题。这是我的Spark Tree component

P.S:MX列表和树有很多错误。就我而言,Spark List有1个:)