【问题标题】:Flash Builder 4 maxDisplayedLines comes back Error #2007 Parameter child must be non-nullFlash Builder 4 maxDisplayedLines 返回错误 #2007 参数子项必须为非空
【发布时间】:2012-03-14 04:55:45
【问题描述】:

我对 flash builder 还很陌生,并且已经制作了一个可以工作的 RSS 提要阅读器,但是我无法让 maxDisplayedLines 截断我的 RichText 对象末尾的文本。它出现错误 #2007 Paramater child must be non-null 但我不知道什么是 null。我正在显示的文本来自 textflow

textFlow="{TextConverter.importToFlow(rdesc, TextConverter.TEXT_FIELD_HTML_FORMAT)}"

在我尝试设置最大线之前,一切都显示正常,甚至是缩略图。顺便说一句,这是针对移动设备的。

错误是 TypeError:错误 #2007:参数 child 必须为非空。 在 flash.display::DisplayObjectContainer/addChild() 在 flashx.textLayout.factory::TextFlowTextLineFactory/callbackWithTextLines()[C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\factory\TextFlowTextLineFactory.as:267] 在 flashx.textLayout.factory::TextFlowTextLineFactory/createTextLinesInternal()[C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\factory\TextFlowTextLineFactory.as:245] 在 flashx.textLayout.factory::TextFlowTextLineFactory/createTextLines()[C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\factory\TextFlowTextLineFactory.as:104] 在 spark.components::RichText/createTextLines()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\RichText.as:1296] 在 spark.components::RichText/http://www.adobe.com/2006/flex/mx/internal::composeTextLines()[E:\dev\4.y\frameworks\projects\spark\src\spark\组件\RichText.as:1173] 在 spark.components.supportClasses::TextBase/updateDisplayList()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\TextBase.as:685] 在 spark.components::RichText/updateDisplayList()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\RichText.as:1131] 在 mx.core::UIComponent/validateDisplayList()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8999] 在 mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736] 在 mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:819] 在 mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]

【问题讨论】:

    标签: flash mobile rss richtext rss-reader


    【解决方案1】:
     html text show in mobile textarea.
    
     <s:TextArea id="ric" width="200" height="100"/>
    
     var textrichtml:String = "<p><b>Scott Carpenter Architect Pty Ltd is a design based</p>";
     TextField(ric.textDisplay).htmlText = textrichtml;
    

    【讨论】:

    • 感谢您的帮助。当我这样做时,它会返回我认为相同的错误。
    • 请用 textarea 代替 RichText 组件。我已经编辑了我的答案。
    • 当我用 TextArea 运行它时,它没有显示任何文本。它说移动设备不支持 TextArea 的 TextFlow。有没有办法让它与 RichText 组件一起使用?它在 RichText 中显示缩略图,我不想丢失它
    • 我用另一种方式在文本框中写了htmltext显示。是你想要的吗?请看答案
    • 现在我收到错误 #1034:类型强制失败:无法将 spark.components.supportClasses::StyleableStageText@b5f4479 转换为 flash.text.TextField。我有一个 RSS 阅读器,适用于 android 工作,我想做的是让文本停止并在故事太长时出现“...”,而不是仅仅切断
    猜你喜欢
    • 2013-02-17
    • 2013-06-02
    • 1970-01-01
    • 2013-07-28
    • 2017-12-26
    • 1970-01-01
    • 2012-07-08
    • 1970-01-01
    • 2011-07-26
    相关资源
    最近更新 更多