zoukankan      html  css  js  c++  java
  • 【Flex】Flex 4中DropDownList的奇怪出错

      只是个很奇怪的问题,我有一个页面有多个DropDownList,绑定dataProvider没问题,当用代码设置selectedItem或selectedIndex时报Label.as处理异常,怎么会跑到Label里去呢?

    ReferenceError: Error #1069: 在 __AS3__.vec.Vector.<flash.display::DisplayObject> 上找不到属性 -1,且没有默认值。
        at spark.components::Label/truncateText()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\Label.as:1246]
        at spark.components::Label/http://www.adobe.com/2006/flex/mx/internal::composeTextLines()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\Label.as:485]
        at spark.components.supportClasses::TextBase/measure()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\TextBase.as:533]
        at mx.core::UIComponent/measureSizes()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8042]
        at mx.core::UIComponent/validateSize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7966]
        at mx.managers::LayoutManager/validateSize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:617]
        at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:733]
        at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]
    

      搜索了很久也没有找到类似的问题和解决,最后用在Adobe的论坛中找到解决方案《exception in Label.as truncateText》(技术的东西还是找官方论坛,够专业有针对性,并自备翻译软件囧`)

      原来在Flex 4下DropDownList字符串过长会出现问题,但Buttons、ComboBox、Panels等就没事(-_-!),应该是DropDownList的bug,用ComboBox代替问题解决

      

  • 相关阅读:
    Redis系列--3.redis配置
    Redis系列--2.redis安装
    Redis系列--1.redis概述
    Redis系列--4.常用命令汇总
    Redis系列之(六)——集群redis cluster
    Redis系列之(五)——哨兵
    Redis系列之(四)——深入reids优化
    Redis系列之(三)——持久化与复制
    Redis系列之(一)——开发基础
    Python执行系统命令的方法
  • 原文地址:https://www.cnblogs.com/litou/p/2227879.html
Copyright © 2011-2022 走看看