Flex——命令管理,Undo来Redo去
前言
Undo,Redo是编辑环境里常见的并且非常重要的功能,下面介绍【命令模式】在Flex/AS3下的实现。
ICommand接口
定义ICommand接口,其中Execute和UnExecute是相反的2个操作,Title属性用于命令显示,例如显示在操作历史列表里。
package cwn.wb.ui.core.command
{
import cwn.core.IDispose;
public
interface ICommand extends IDispose
{
function
get Title():String
function Execute():void
function UnExecute():void
}
}
CommandBase基类
CommandBase类主要实现ICommand接口,所有Command类都将继承CommandBase类。
package cwn.wb.ui.core.command
{
import cwn.core.IDispose;
public
class CommandBase implements ICommand
{
public
function CommandBase()
{
}
//===================ICommand========================
protected
var _Title:String;
public
function
get Title():String
{
return _Title;
}
public
function Execute():void
{
throw
new Error("Not implementation.");
}
pub
相关文档:
--------web.xml文件
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>
--------Java代码
public class GetSeesion {
/**
* 设置session
* */
public ......
Top 10 things new Flex developers should know
By Michael Portuesi | Published: November 27, 2009
While helping a coworker get started with Flash and Flex development, I thought it would be a good time to cover the list of things that I have found pretty essential to know about Flex development, co ......
==============flex===========
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="Service.GetCustomers.send();" width="689" height="592">
<mx:WebService id="Service" wsdl="ht ......
性能测试是一项浩大的工程,若你只想随便找台机器装上ld后,造几条数据,弄几个并发用户简单跑一下出来结果就可以万事大吉了,那你就大错特错了!(这样得出的测试结果没有任何价值和意义,当然更无法依此评估出你贵公司系统的性能了。
性能测试真正开始执行之前 ......
前言
C/C++的开发,内存的管理是十分重要的课题,分配内存使用后要及时释放,否则内存泄漏导致内存耗尽。进入托管环境后,内存能够自动管理和回收,已经不用开发者太操心内存管理方面的问题了,在托管环境,开发者仍然可以做一些工作,提供内存回收的效率,例如,把类内部的引用对象设置为null是最基本的。借鉴在.net环境 ......