0 0

大家帮我看看哪里出错了5

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" 
               preinitialize="init();" viewSourceURL="srcview/index.html">
    
    <!-- Based on samples from Peter DeHaan's blog: http://blog.flexexamples.com/ --> 
    
    <fx:Script>
        import flashx.textLayout.elements.Configuration;
        import flashx.textLayout.elements.TextFlow;
        import flashx.textLayout.formats.TextDecoration;
        import flashx.textLayout.formats.TextLayoutFormat;
        
        import spark.events.TextOperationEvent;
        
        [Bindable]protected static var lineCount:uint = 0;
        
        protected function richEdTxt_changeHandler(evt:TextOperationEvent):void {
            lineCount = richEdTxt.mx_internal::textContainerManager.numLines;
            lineCnt.text = lineCount.toString();
        }
        
        protected function init():void {
            var cfg:Configuration = TextFlow.defaultConfiguration;
            
            var normalTLF:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkNormalFormat);
            normalTLF.color = 0xFF0000;
            
            var hoverTLF:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkHoverFormat);
            hoverTLF.color = 0xFF00FF;
            hoverTLF.textDecoration = TextDecoration.NONE;
            
            var activeTLF:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkActiveFormat);
            activeTLF.color = 0x00FF00;
            
            cfg.defaultLinkNormalFormat = normalTLF;
            cfg.defaultLinkHoverFormat = hoverTLF;
            cfg.defaultLinkActiveFormat = activeTLF;
            TextFlow.defaultConfiguration = cfg;
        }
    </fx:Script>
    <fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";
        @namespace mx "library://ns.adobe.com/flex/mx";
        
        s|VGroup s|Label {
            fontWeight: "bold";
        }
    </fx:Style>
    <s:Panel width="100%" height="100%"
             skinClass="skins.TDFPanelSkin"
             title="RichEditableText Sample">
        
        <s:VGroup id="vgrp" width="100%" height="100%" top="10" left="15">
            <s:HGroup>
                <s:Label text="Uneditable text with formatted link:"/>
                <s:RichEditableText editable="false">
                    <s:content>
                        <s:p>The quick brown <s:a href="http://www.adobe.com/">fox</s:a> jumps over the lazy dog.</s:p>
                    </s:content>
                </s:RichEditableText>
            </s:HGroup>
            <s:HGroup>
                <s:Label text="Editable text:"/>
                <s:RichEditableText id="richEdTxt" widthInChars="20" heightInLines="10" 
                                    change="richEdTxt_changeHandler(event);" backgroundColor="0xCCCCCC" text="Hello world!">
                </s:RichEditableText>    
            </s:HGroup>
            <s:HGroup>
                <s:Label text="Line Count of editable text:"/>
                <s:Label id="lineCnt"/>    
            </s:HGroup>
            
        </s:VGroup>
        <s:Label width="266" height="180" right="10" top="38" color="0x323232" text="RichEditableText is a low-level UIComponent for displaying, scrolling, selecting, and editing richly-formatted text.
The rich text can contain clickable hyperlinks and inline graphics that are either embedded or loaded from URLs. RichEditableText does not have scrollbars, but it implements 
the IViewport interface for programmatic scrolling so that it can be controlled by a Scroller, which does provide scrollbars. It also supports vertical scrolling with the mouse wheel." />
    </s:Panel>
    
</s:Application>

问题补充:
柴秉承 写道
你的皮肤代码呢?除去皮肤 运行没问题 没有异常

我要哭了,大哥。又是你啊。为什么我出的问题你那就是不出现呢.......你看看报的错呜呜呜。
TypeError: Error #1034: 强制转换类型失败:无法将 flashx.textLayout.formats::TextLayoutFormat@8dce041 转换为 flashx.textLayout.formats.TextLayoutFormatValueHolder。
	at flashx.textLayout.elements::LinkElement/computeLinkFormat()[C:\Vellum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\elements\LinkElement.as:427]
	at flashx.textLayout.elements::LinkElement/get http://ns.adobe.com/textLayout/internal/2008::effectiveLinkElementTextLayoutFormat()[C:\Vellum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\elements\LinkElement.as:463]
	at flashx.textLayout.elements::LinkElement/get http://ns.adobe.com/textLayout/internal/2008::formatForCascade()[C:\Vellum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\elements\LinkElement.as:470]
	at flashx.textLayout.elements::FlowGroupElement/http://ns.adobe.com/textLayout/internal/2008::applyWhiteSpaceCollapse()[C:\Vellum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowGroupElement.as:1094]
	at flashx.textLayout.elements::FlowGroupElement/http://ns.adobe.com/textLayout/internal/2008::applyWhiteSpaceCollapse()[C:\Vellum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowGroupElement.as:1102]
	at flashx.textLayout.elements::FlowGroupElement/http://ns.adobe.com/textLayout/internal/2008::applyWhiteSpaceCollapse()[C:\Vellum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowGroupElement.as:1102]
	at flashx.textLayout.elements::TextFlow/set mxmlChildren()[C:\Vellum\branches\v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\elements\TextFlow.as:564]
	at spark.components::RichEditableText/createTextFlowFromContent()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\RichEditableText.as:3569]
	at spark.components::RichEditableText/commitProperties()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\RichEditableText.as:2311]
	at mx.core::UIComponent/validateProperties()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:7933]
	at mx.managers::LayoutManager/validateProperties()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:572]
	at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:700]
	at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]


问题补充:
柴秉承 写道
skinClass="skins.TDFPanelSkin"   把皮肤类的代码贴出来 
没有皮肤的情况下 测试没有问题 下面是运行效果


真不知道说什么好了。我现在还是报错。放在别人那还是错误............
2011年10月13日 16:35

2个答案 按时间排序 按投票排序

0 0

skinClass="skins.TDFPanelSkin"   把皮肤类的代码贴出来 
没有皮肤的情况下 测试没有问题 下面是运行效果

2011年10月14日 09:15
0 0

你的皮肤代码呢?除去皮肤 运行没问题 没有异常

2011年10月13日 18:04

相关推荐

    我的C++大家帮我看看阿

    从提供的文件名列表来看,我们有四个源代码文件:Animo.cpp、Fish.cpp、main.cpp以及两个头文件Fish.h和Animo.h。这似乎是一个包含类定义(Animo和Fish)以及主程序(main.cpp)的小型项目。现在,让我们深入探讨...

    flex调试出错了怎么办,进来看看吧

    在探讨“Flex调试出错了怎么办,进来看看吧”这一主题时,我们首先需要了解Flex与Adobe Flash Player之间的关系,以及在调试过程中可能遇到的问题及其解决办法。 ### Flex与Adobe Flash Player的关系 Flex是一种...

    js 实现 脚本永不出错

    js 实现 脚本永不出错! 值得下载看看!资源免费,大家分享!!

    数字计时钟程序,数字计时钟程序

    大家帮我看看此程序问题在哪里,总是出错.大家帮我看看此程序问题在哪里,总是出错

    Phenlit 麻烦帮我看看这段程序

    标题中的"Phenlit 麻烦帮我看看这段程序"表明这是一个请求帮助的场景,涉及到的是编程问题。描述中提到的“登录时账号密码为123”涉及到的是用户认证系统,而“出现错误的文件为xueshengxinxi”意味着这个文件可能是...

    【迅雷看看缓存】清理工具

    在当今数字化时代,视频内容已成为互联网流量的主导,而迅雷看看作为流行的在线视频平台之一,深受众多用户喜爱。随着观看体验的优化,迅雷看看会在后台自动下载和存储缓存文件,以确保视频播放的流畅性和连贯性。...

    出错的源代码

    出错的源代码,请帮忙看看!!!

    对话矿关闭后出错

    描述中的“这只是一个临时文件,对大家没有什么用的”,暗示了问题可能源于一个临时文件。在计算机系统中,临时文件是程序运行过程中创建的,用于存储中间结果或设置。这些文件通常是短暂存在的,不被用户直接访问,...

    有问题的QT程序,请大家帮忙看一下吧

    有问题的QT程序 这个程序的功能是客户端向服务器...但不知为什么,服务器一接收数据就出错,请大家帮我看一下吧,先谢谢了。 (提示说不能向别的线程发送信号/数据,但我所有的问题都是在同一个线程里面处理的啊?)

    停用连接出错,无法停用连接的解决方法!

    你可以尝试禁用或卸载该软件,然后重启电脑,看看问题是否得到解决。 此外,系统还原可能也是一个有效的解决方案。如果在某个时间点之前网络连接可以正常停用,你可以尝试执行系统还原,将系统设置回那个时间点,...

    PHPWIND 8.3 仿迅雷看看首页模板,门户首页模板.rar

    风格名称:仿迅雷看看首页模板for...制作风格只是个人爱好,免费提供,喜欢的可以下载使用,迅雷看看的风格简单大方,相信大家也都喜欢这类风格。门户风格,兼容8.3。 注意点:播放器要满6个才能切换哦,不然会js出错!

    还有这些都可以看看,很有用大家共同学习学习吧

    大家共同学习学习吧,都是关于AD采样的,挺好的

    导出到excel出错的补丁

    首先,让我们来看看描述中提到的关键点。描述指出,你需要在具有Office 2003环境的系统上进行这项操作。这是因为早期版本的.NET框架和Excel的互操作性主要依赖于Microsoft Office Interop组件,这是一个允许.NET代码...

    【python实例6.3】wordcloud库安装出错的解决方案.md

    关于wordcloud库安装出错的解决方案,可以看我的操作,下载相关资料,选择对应版本进行安装,这里可能有同学看不懂,比如说我安装python版本是3.8.1、32位,对应的是上面图中的cp38,win32,这里特别注意的是,不是...

    mysql出错信息表

    从给定的文件信息来看,我们正在探讨的是MySQL数据库中可能出现的各种错误代码及其对应的中文解释。MySQL是一款广泛使用的开源关系型数据库管理系统,它在数据存储、检索和管理方面提供了强大的功能。然而,在数据库...

    XP安装Oracle 10时实例化EM配置文件时出错解决方案

    从提供的日志片段来看,用户首先使用`emca-reposdrop`命令来删除现有的EM资料档案库,之后尝试重新创建资料档案库并配置Database Control。这一系列操作表明,用户是在试图解决由于EM配置文件损坏或不兼容导致的问题...

    wicne问题程序,希望大家帮忙帮我解决

    标题 "wicne问题程序,希望大家帮忙帮我解决" 暗示了这可能是一个关于编程或软件开发中的问题,可能是由于代码错误、配置不当或不兼容性导致的。描述 "有问题的程序,希望能得到解决,好要写够20个字阿" 提供的信息较...

    一个很不错的个人博客啊大家可以看看啊

    从标签来看,“一个很不错的个人博客啊大家可以看看啊”重复出现,进一步强调了博客的质量和推荐的意图。 在压缩包文件的列表中,我们可以看到一些关键文件: 1. **版权说明.txt**:这是一个关于博客内容版权的...

    通讯出错,请高手解答

    在IT领域,通讯出错是一个常见的问题,涉及到网络通信、硬件接口、协议栈等多个方面。以下是一些可能的原因和解决方案: 1. **网络连接问题**:通讯错误常常源于网络连接不稳定或断开。检查网络线路是否正常,Wi-Fi...

    解决R14在windows XP下运行经常莫名其妙出错退出的问题

    在Windows XP操作系统上运行时,用户遇到了程序无故出错并退出的问题。这个问题可能是由于多种原因引起的,包括但不限于系统兼容性、硬件资源限制、驱动不兼容、软件冲突或病毒攻击等。下面将详细探讨这些可能的原因...

Global site tag (gtag.js) - Google Analytics