包 | com.adobe.solutions.exm.runtime.impl |
类 | public class SimpleFunctionMapper |
继承 | SimpleFunctionMapper EventDispatcher Object |
实现 | IFunctionMapper, IEventDispatcher |
语言版本: | ActionScript 3.0 |
产品版本: | Expression Manager Building Block 10 |
运行时版本: | AIR (unsupported), Flash Player 10.2 |
- Remote function references are of the form "REMOTE_[scope]:[functionName](...)". These resolve to RPC calls and are asynchronous by nature. The remote endpoint used is a Flex remoting destination with ID [scope], and must have a function with name [functionName] defined on it.
- Local function calls are of the form "[scope]:[functionName](...)" with no special prefix. The [scope] and [functionName] combination must map to a function defined on an ActionScript class which is available in the current ApplicationDomain. This mapping can be loaded from the server on initialization (pass true to the SimpleFunctionMapper constructor), or can be configured by the application using the addFunction() method (or a combination of both).
方法 | 由以下参数定义 | ||
---|---|---|---|
SimpleFunctionMapper(initFromServer:Boolean = false)
Creates a new SimpleFunctionMapper instance. | SimpleFunctionMapper | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。 | EventDispatcher | ||
Adds a new local function mapping. | SimpleFunctionMapper | ||
将事件调度到事件流中。 | EventDispatcher | ||
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。 | EventDispatcher | ||
表示对象是否已经定义了指定的属性。 | Object | ||
表示 Object 类的实例是否在指定为参数的对象的原型链中。 | Object | ||
表示指定的属性是否存在、是否可枚举。 | Object | ||
从 EventDispatcher 对象中删除侦听器。 | EventDispatcher | ||
Resolves the given scope and function-name to either an RPC operation or a
local ActionScript method, depending on whether or not the scope starts with the
"REMOTE_" keyword. | SimpleFunctionMapper | ||
设置循环操作动态属性的可用性。 | Object | ||
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。 | Object | ||
返回指定对象的字符串表示形式。 | Object | ||
返回指定对象的原始值。 | Object | ||
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。 | EventDispatcher |
SimpleFunctionMapper | () | 构造函数 |
public function SimpleFunctionMapper(initFromServer:Boolean = false)
语言版本: | ActionScript 3.0 |
产品版本: | Expression Manager Building Block 10 |
运行时版本: | AIR (unsupported), Flash Player 10.2 |
Creates a new SimpleFunctionMapper instance. If the initFromServer flag is true, the calling application must wait for the instance to dispatch an Event of type "serverInitializationSuccess" before the instance can be used. If initialization from the server is unsuccessful, the instance will notify the application by dispatching an Event of type "serverInitializationError".
参数initFromServer:Boolean (default = false ) — Whether local function mappings should be loaded from the server.
|
addFunction | () | 方法 |
public function addFunction(inExpr:String, actual:String):void
语言版本: | ActionScript 3.0 |
产品版本: | Expression Manager Building Block 10 |
运行时版本: | AIR (unsupported), Flash Player 10.2 |
Adds a new local function mapping. The mapping is from a function reference of the form "[scope]:[functionName]" to an actual function of the form "[ActionScript_class_name]:[method_name]".
参数
inExpr:String — A function reference of the form "[scope]:[functionName]"
| |
actual:String — The mapped function, in the format "[ActionScript_class_name]:[method_name]".
|
resolve | () | 方法 |
public function resolve(scope:String, functionName:String):Function
语言版本: | ActionScript 3.0 |
产品版本: | Expression Manager Building Block 10 |
运行时版本: | AIR (unsupported), Flash Player 10.2 |
Resolves the given scope and function-name to either an RPC operation or a local ActionScript method, depending on whether or not the scope starts with the "REMOTE_" keyword.
参数
scope:String — The scope of the function.
| |
functionName:String — The name of the function.
|
Function — The resolved function.
|
Tue Jun 12 2018, 11:04 AM Z