- 浏览: 498334 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (185)
- job (15)
- linux/windows/unix/bash/shell (31)
- JAVA/J2EE/spring/hibernate/struts (30)
- VC/C++ (48)
- mysql/postgresql (6)
- php/jsp/asp/pear (1)
- FMS/flex/openlaszlo/red5/openmeetings (34)
- apache/tomcat/ftp/svn (6)
- xen/vm/Hadoop/cloudcompute (6)
- visual studio/eclipse/zendstudi/ant (8)
- others (1)
- windows异常处理 __try __except (1)
- (1)
- matlab (4)
- android (0)
最新评论
-
hongzhounlfd:
很透彻,很详细
依赖注入和控制反转 -
jefferyqjy:
谢谢~言简意赅~很明了!
依赖注入和控制反转 -
elderbrother:
太好了,谢谢
依赖注入和控制反转 -
east_zyd_zhao:
终于搞明白了
依赖注入和控制反转 -
Dremeng:
完美,一看就懂理解透彻
依赖注入和控制反转
event是建立在对象之间通信的机制。比如当鼠标点击的时候,从服务器接受数据的时候,或者当view建立的时候。Events are the mechanism by which objects communicate with each other when something changes. For example, an event might be generated when a mouse button is clicked, or when data arrives from a server, or when a view has been constructed.
在LZX中,events不是广播,是使用delegates的点对点的通信。当事件发生的时候这些点是基本的功能点。
In LZX programs, events are not broadcast, but rather they are communicated in a point-to-point fashion using delegates
, which are basically function pointers that are referenced when events happen.
这种措施增加了灵活性和减少了使用events的负担。
This implementation increases flexibility and reduces the overhead of using events. However, for the purposes of the discussion in this chapter we're going to ignore delegates and speak of events in a slightly less 严密的方式, saying, for example when such-and-such an event occurs, thus and such happens, leaving aside for now an explanation of how it happens.
Views have 大约two dozen defined events, as listed on the entry for <view>
in the LZX Reference Manual. Many of these events that deal with user input, such as onblur
, onclick
, onkeydown
, will be familiar to JavaScript programmers. Other events, such as onheight
and onopacity
, pertain to views' visible attributes. Finally, the oninit
and onconstruct
events are related to the creation of the instances of view objects. Similarly, other system-defined LZX objects such as Datasets (see below) have events associated with them.
Events and attributes often 成对出现, and in fact, the default behavior of the setAttribute()
method is to set the named property and send the event called "on
" + property. For instance, when a view changes its x
(horizontal) position, it sends the event onx
with the new value for its x
property. This means that in addition to system-defined events, there exists an event for each attribute you define.
When an event happens, control is transferred to its associated event-handler (if one is defined). Events can be sent with a single argument, which usually conveys information about the property that changed.
Elsewhere in this Guide we discuss how events are implemented in LZX, and how the event architecture bears upon program design. In particular, Chapter 30, Delegates discusses the relationship between events and delegates.
In LZX, a method is a JavaScript function associated with a particular object.
Functions are invoked using the ()
operator. Thus,
<view name="dog"> <method name="bark"> <!-- some JavaScript code --> </method> </view>
Defines a function that is executed when invoked by name, as in
dog.bark();
In JavaScript, the this
keyword is used to refer to the object through which the function was invoked.
A handler is like a method. But whereas a method is invoked by its name, a handler must be associated with a particular event. The handler script will be executed when the referenced view receives an event with this name. For example,
<view> <handler name="onclick"> <!-- some JavaScript code --> </handler> </view>
defines a function that is executed when the view is clicked on. Consider
<view>
<method name="bark">
<!-- some JavaScript code -->
</method>
<handler name="onclick">
this.bark()
</handler >
</view>
When the view is clicked on, the onclick
event causes the execution of the handler()
which in turn invokes the method named bark()
. Event handlers are often identified in an opening tag, as in
<view onclick="clickHandler()"> <method name="clickHandler"> <!-- some JavaScript code --> </method> </view>
There are three general categories of methods and handler:
-
"On init" methods that are invoked when their parent object is created;
-
handlers that are invoked when their parent object receives a specified event;
-
named methods that are explicitly invoked by other methods.
Note that you can define a method using conventional JavaScript syntax, but in LZX the preferred way to declare a method is with the <method>
tag.
Also note that in LZX, unlike many other object-oriented systems, you can override a method in an instance of an object. This topic is covered in Chapter 33, Extending Classes.
发表评论
-
Red5安装和配置
2011-02-24 10:23 4056Red5安装和配置参考网页:http://www.cahblo ... -
基于Moodle平台的网站调查报告
2011-02-24 10:18 2583基于Moodle平台的网站调查报告 网站举例: ² 西南 ... -
moodle插件模块功能汇总
2011-02-24 10:03 5020Moodle官方提供654种插件或者模块moodle.org ... -
moodle 一体包安装手册(window)
2011-02-24 09:55 1291见附件 -
moodle中上传文件大小控制
2011-02-24 09:51 1850第一步:修改在php4下POST文件大小的限制1.编修php. ... -
linux下面安装moodle
2011-02-24 09:50 20911. 安装moodle运行 ... -
OpenMeetings安装文档
2011-02-15 11:09 2609OpenMeetings 是一个多语言可定制的视频会议和协作系 ... -
Compilation and Execution (openlaszlo)
2010-11-22 11:02 10577. Compilation and Exe ... -
Combining Tags and Script in LZX Programs (openlaszlo)
2010-11-22 11:01 13276. Combining Tags and ... -
Data Access, Manipulation, and Binding (openlaszlo)
2010-11-22 10:33 12065. Data Access, Manipu ... -
Constraints(openlaszlo)
2010-11-22 10:18 1132constraint 表示可变的变量赋值形式 In LZX, ... -
Dimdim&Moodle安装配置文档节选
2010-11-09 17:40 2558Dimdim&Moodle安装配置文档节选 ... -
Red5如何响应rmpt的请求,中间涉及哪些关键类?
2010-11-01 15:35 1551Red5如何响应rmpt的请求,中间涉及哪些关键类? 响应请 ... -
red5的eclipse插件和用法
2010-10-30 20:56 1149参见http://www.red5.org/wiki/Red5 ... -
red5集群分析
2010-10-28 19:42 50361. 边(Edge ): 1. 边的主要作用是管理连接,并可以 ... -
red5源代码分析
2010-10-26 08:59 3872Red5如何响应rmpt的请求 ... -
创建第一个red5程序
2010-10-25 15:33 21571.下载最新版本的RED5 http://osflash.or ... -
openlaszlo中多媒体组件介绍
2010-10-14 15:50 1133在openlaszlo中我们可以处理图像,音视频等媒体文件。详 ... -
openlaszlo组件的简单介绍
2010-10-14 15:50 1299openlaszlo组件的简单介绍 收藏 在写laszlo ... -
创建一个简单的openlaszlo程序
2010-10-14 15:49 1078前面说到过openlaszlo程序是一组xml格式和javas ...
相关推荐
- **事件(Events)**:处理用户输入和其他触发条件下的响应行为。 - **脚本(Scripting)**:提供脚本语言支持,用于控制应用程序的行为。 - **内联 HTTP(Inline HTTP)**:允许应用程序直接进行网络请求。 - **绘图 API...
手册中的"labs.openlaszlo.org"可能是一个指向OpenLaszlo官方实验室的链接,这个实验室通常包含各种示例、实验项目和最新的技术探索,是学习和了解OpenLaszlo最新功能的好地方。在这里,开发者可以找到实际的代码...
Applet和Openlaszlo是两个在Web开发领域中用于创建动态、交互式用户体验的技术。本文将深入探讨这两个概念以及它们之间的通信机制。 首先,Applet是Java编程语言的一个组成部分,它允许开发者创建可以在Web浏览器中...
OpenLaszlo —— 一个快速构建和部署富 Internet 应用程序的平台 -- Linux,C,C++,Java,Ajax,XML,perl,php,python,ruby,MySQL,Gnome,KDE,Qt,Gtk,bash,shell,嵌入式,网络,信息安全,操作系统,数据结构,编译原理
openlaszlo应用程序开发使用的是基于XML的LZX语言,它可以被编译成DHMTL,SWF等格式。 openlaszlo可作为openmeetings客户端的编译。 因安装程序90+MB,所以切分为两个压缩包。 openlaszlo-4.9.0-windows-dev-install....
openlaszlo应用程序开发使用的是基于XML的LZX语言,它可以被编译成DHMTL,SWF等格式。 openlaszlo可作为openmeetings客户端的编译。 因安装程序90+MB,所以切分为两个压缩包。 openlaszlo-4.9.0-windows-dev-install....
openlaszlo应用程序开发使用的是基于XML的LZX语言,它可以被编译成DHMTL,SWF等格式。 是openmeetings视频会议系统的默认开发编译工具。
这是用Openlaszlo开发的计算器程序,可以实现基本的计算操作。 我是刚学openlaszlo,欢迎朋友们提出宝贵意见!
使用OpenLaszlo构建J2EE中的RIA程序,高春阳,龚群侃,当前,Web 应用程序就要进入了一个新的时期,富互联网客户端(RIA ,Rich Internet Application) 以其极大地用户交互性、优秀的外观设计、良好��
2. **配置步骤**:首先,下载OpenLaszlo Server的servlet文件(如openlaszlo-3.3.3-servlet.war),将其解压并放入Tomcat的webapps目录下。启动Tomcat后,LPS会被自动部署。接着,可以创建LZX文件并进行测试。 **...
这使得开发者能够利用OpenLaszlo来创建跨平台、兼容多种浏览器的富互联网应用。该项目的官方站点在http://openlaszlo.org,这是一个宝贵的资源库,包含了文档、示例代码和社区支持,对于学习和使用OpenLaszlo的人来...
OpenLaszlo is an increasingly popular open-source platform for the development and delivery of rich internet applications across multiple platforms: Flash, DHTML, and J2ME. The dramatic emergence of ...
Geoar - WMS/WFS OpenLaszlo 客户端GeoAr 是 WMS 和 WFS 服务的富客户端实现。 它是在 LZX (OpenLaszlo) 上开发的,因此它向用户的浏览器提供 dhtml 或 flash,从而提供在它们之间进行选择的机会,但只有一个服务器...
### Openlaszlo+JSF:SWF动画制作与Struts框架整合配置详解 #### 一、OpenLaszlo简介及SWF动画制作 **OpenLaszlo**是一款开源的跨平台开发工具,用于创建RIA(Rich Internet Applications)。它允许开发者使用一种...
"Spket1.6.18"是一款专为JavaScript和OpenLaszlo开发的智能代码提示工具,它作为Eclipse集成开发环境(IDE)的插件,极大地提升了开发者的工作效率。这款工具的主要功能是为JavaScript和OpenLaszlo语言提供语法高亮...
在这一部分,我们将深入探讨如何理解和修改OpenMeetings的源代码,特别是针对那些不熟悉OpenLaszlo开发语言的开发者。 OpenLaszlo是一种用于构建富互联网应用程序(RIA)的平台,它允许开发者用一种统一的声明式语言...
- 首先,你需要下载 OpenLaszlo Server 的servlet包,例如 `openlaszlo-3.3.3-servlet.war`,并将它部署到Tomcat的 `webapps` 目录下。 - 启动Tomcat后,会自动解压war文件,并创建一个名为 `openlaszlo-3.3.3-...
9. **OpenLaszlo Server**: OpenLaszlo用于编译OpenMeeting的客户端界面。下载并安装相应版本的OpenLaszlo服务器,然后进行配置。 10. **OpenMeeting源代码**: 通过Subversion (SVN) 从指定URL获取OpenMeeting的源...
如果这个项目与OpenLaszlo有关,那么可能是将C++编写的火焰识别算法集成到OpenLaszlo应用中,以提供更丰富的视觉体验。 文件列表中的“实例77”可能是一个示例项目或者代码片段,展示了如何使用提供的C++ API来实现...
手册详尽地介绍了Laszlo的核心概念、安装配置、LZX语言、事件处理、动态效果、约束机制以及OpenLaszlo的开发实践,旨在帮助读者快速掌握Laszlo并应用于Web工程。 Laszlo是一种开源的富互联网应用程序(RIA)开发...