flex的调试,困难我想用过的人都有所了解的,就算用里面的show或是拿一个textArea来显示,也不一定可以显示出完整的信息,就简单的Object对象也是直接显示Object,至于里面的细节难得追究。
而MM自己提供的一个工具----flex trace panel
可以说大大的方便了调试,打印详细信息,还可以只显示自己需要的出错,警告,信息等不同级别信息。
可在网上找了很久,没有找到相关的中文说明,找了个英文,使用的方法也很简单的,顺便用中文简单的描述下:
将下载的包解压后放工程一个目录
假设路径:de\richinternet.\utils\Dumper.as
那么,你可以打开Dumper.as类里面的函数看看,很简单的五个函数:
de.richinternet.utils.Dumper.dump(message:Object, level:Number):Void --------------这个函数的功能是可以打印调试信息,提供的参数是一个对象(只要Object继承来的都可以,也就是任意类型啦,哈哈),第二个参数是一个信息级别。一般只要提供一个对象,啥信息都给你打出来。很详细哦。基本上调试用这个就够了哦。
takes the passed Object (any type) and routes it to the Flex Trace Panel, the 2nd paramter is optional and refers to the different log levels of the Dumper class (the default is Dumper.INFO)
de.richinternet.utils.Dumper.trace(message:Object):Void --------------------这个函数没啥意思,就打印调试信息,说实话,一点用都没。
takes the passed Object (any type) calls the Dump.dump() method with log level Dumper.INFO (2).
de.richinternet.utils.Dumper.info(message:Object):Void -----------------这个也是破函数。打印信息的
takes the passed Object (any type) calls the Dump.dump() method with log level Dumper.INFO (2).
de.richinternet.utils.Dumper.warn(message:Object):Void ---------------这个还马马虎虎,打印警告信息
takes the passed Object (any type) calls the Dump.dump() method with log level Dumper.WARN (4).
de.richinternet.utils.Dumper.error(message:Object):Void -------------------这个嘛,嘿嘿,它打印了你就惨了,打印错误信息,你的对象出错了,它就打。
takes the passed Object (any type) calls the Dump.dump() method with log level Dumper.ERROR (8).
呵呵
就这么几个简单的函数,但我还是写详细点吧,对大家有用的是下面哦(注意看):
在ActionScript里面,随便哪个地方调用这个(当然要保证我们打的对象testResult存在的,起码前面定义了的,不然就没意义了):
import de.richinternet.utils.Dumper;
de.richinternet.utils.Dumper.dump(testResult);
显示的就下面类似信息:
哈哈,其实说这么多,就上面两句和下面的地址有用
别打我哦
下载地址:http://www.macromedia.com/devnet/flex/articles/tracepanel.html
分享到:
相关推荐
flex-messaging-core jar包
flex-messaging-4.7.3最新版本的jar
flex-messaging-proxy.jarflex-messaging-proxy.jarflex-messaging-proxy.jarflex-messaging-proxy.jar
flex-messaging-common
flex-iframe-1.4.6.rar (code google)
flex-messaging-core-amf1.7
flex-messaging-remoting.jarflex-messaging-remoting.jarflex-messaging-remoting.jarflex-messaging-remoting.jar
flex-messaging-common.jarflex-messaging-common.jarflex-messaging-common.jarflex-messaging-common.jar
flex-messaging-core.jar
flex-messaging-opt.jarflex-messaging-opt.jarflex-messaging-opt.jarflex-messaging-opt.jar
1 22 跟我StepByStep学FLEX教程------Flex和Java通信之开发方式和工具准备 1 23 跟我StepByStep学FLEX教程------Flex+LCDS(BlazeDS)+Java开发 1 24 跟我StepByStep学FLEX教程------Demo11之HelloJavaFlex 1 25 跟...
FLEX开发工具。Flex Builder 4-7 win64 安装文件,第三卷。
flex-messaging-core-4.7.3.jar 最新版,下载了好长时间才下载下来,亲测可用!
flex-messaging-common-1.0.jar 资源共享,有需要其他jar包的可以在评论留言,看到后我会陆续上传。
flex-messaging-opt-1.0.jar 资源共享,有需要其他jar包的可以在评论留言,看到后我会陆续上传。
Flex SVN--1.5.5版本Flex SVN--1.5.5版本Flex SVN--1.5.5版本Flex SVN--1.5.5版本Flex SVN--1.5.5版本Flex SVN--1.5.5版本Flex SVN--1.5.5版本
flex布局 justify-content 解决最后一排数量不够自动向两端排列问题,简单,高效,好用。