Flex4 CookBook 之类与接口

1.IDataInterface.as:

package oreilly.cookbook {
public interface IDataInterface {
function set dataType(value:Object):void;
function get dataType():Object;
function update():Boolean;
function write():Boolean;
function readData():Object;
}
}


2.ClientData.as:

package oreilly.cookbook {
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
public class ClientData extends EventDispatcher implements IDataInterface {
private var _dataType:Object;
public function ClientData(target:IEventDispatcher=null) {
super(target);
}
public function set dataType(value:Object):void {
_dataType = value;
}
public function get dataType():Object {
return _dataType;
}



你可能感兴趣的:(function,object,Flex,Class,import,interface)