UIComponent.document是Application
来源:互联网 发布:手机淘宝首页分类 编辑:程序博客网 时间:2024/04/29 12:47
Flex的UI组件(包括Application)都有document属性。
该属性的官方定义是:引用与此 UIComponent 相关联的文档对象。文档对象是位于 Flex 应用程序、MXML 组件或 AS 组件层次结构顶层的 Object。
在Flex中,文档类是mx.managers.SystemManager。难道document指的是SystemManager?
不是。指的是Application。
验证如下:
执行结果是:信息框没有显示文字"1"。
信息框显示文字:“2”和“3”。
显示2说明document就是Application。
显示3说明mx_internal命名空间的_document也是Applicaiton。
<?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" minWidth="955" minHeight="600" creationComplete="init()"><fx:Script><![CDATA[import mx.controls.Alert;public function init():void{if(this.document == this.systemManager){Alert.show("1");}if(this.document == this){Alert.show("2");}if(this.document == mx_internal::_document){Alert.show("3");}}]]></fx:Script></s:Application>
参考:
编译器生成的代码文件:主程序_ generated.as的构造函数中有如下代码
mx_internal::_document = this;
- UIComponent.document是Application
- UIComponent
- Document-Based Application Architecture
- InternetExplorer.Application 操作 document
- UIComponent研究
- 啥是Document类型
- Symbian中得到AppUi,Document,Application
- LifeCycle of UIcomponent
- Using the UIComponent class
- Observations on UIComponent Drawing
- UIComponent之life cycle
- UIComponent Shape Graphics
- Adobe Flex UIComponent LifeCycle
- Adobe Flex UIComponent LifeCycle
- iframe的document属性和Document属性是不一样的
- document.all和document.layers是表示什么啊?
- Trick: Open document file with its associated application(Symbian)
- symbian中的模板函数用于得到AppUi/Document/Application
- 一致代码段和非一致代码段
- 我的OpenCV学习笔记(四):给图像加上水印效果
- JCF之equals与==分析
- Linux vsftp
- 程序员职业发展感想-2012.4.22
- UIComponent.document是Application
- 【win32程序控制台】练习题:抽象基类与虚函数、纯虚函数的综合使用
- 从JSP页面发送中文信息给Servlet乱码错误。
- 回调函数
- csdn第二次 实训·····之···最后一课
- 八皇后
- 关于“using namespace std”
- std::vector : 用法与技巧
- 第十周实验报告2(派生类)