套件 | mx.rpc |
類別 | public dynamic class AsyncToken |
繼承 | AsyncToken EventDispatcher Object |
子類別 | CacheToken, ItemReference, RCAToken |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
ResultEvent
and
FaultEvent
from the token
property.
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
message : IMessage [唯讀]
Provides access to the associated message. | AsyncToken | ||
responders : Array [唯讀]
An array of IResponder handlers that will be called when
the asynchronous request completes. | AsyncToken | ||
result : Object [唯讀]
The result that was returned by the associated RPC call. | AsyncToken |
方法 | 定義自 | ||
---|---|---|---|
AsyncToken(message:IMessage = null)
Constructs an instance of the token with the specified message. | AsyncToken | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
Adds a responder to an Array of responders. | AsyncToken | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
Determines if this token has at least one mx.rpc.IResponder registered. | AsyncToken | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
事件 | 摘要 | 定義自 | ||
---|---|---|---|---|
[廣播事件] 當 Flash Player 或 AIR 應用程式取得作業系統焦點並成為作用中時傳送。 | EventDispatcher | |||
[廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。 | EventDispatcher | |||
Dispatched when a property of the channel set changes. | AsyncToken |
message | 屬性 |
responders | 屬性 |
responders:Array
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
An array of IResponder handlers that will be called when
the asynchronous request completes.
Eaxh responder assigned to the token will have its result
or fault
function called passing in the
matching event before the operation or service dispatches the
event itself.
A developer can prevent the service from subsequently dispatching the
event by calling event.preventDefault()
.
Note that this will not prevent the service or operation's
result
property from being assigned.
實作
public function get responders():Array
result | 屬性 |
result:Object
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The result that was returned by the associated RPC call. Once the result property on the token has been assigned it will be strictly equal to the result property on the associated ResultEvent.
此屬性可以做為資料繫結的來源。一旦修改此屬性,將傳送 propertyChange
事件。
實作
public function get result():Object
AsyncToken | () | 建構函式 |
addResponder | () | 方法 |
public function addResponder(responder:IResponder):void
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Adds a responder to an Array of responders.
The object assigned to the responder parameter must implement
mx.rpc.IResponder
.
參數
responder:IResponder — A handler which will be called when the asynchronous request completes.
|
相關 API 元素
hasResponder | () | 方法 |
propertyChange | 事件 |
mx.events.PropertyChangeEvent
屬性 PropertyChangeEvent.type =
mx.events.PropertyChangeEvent.PROPERTY_CHANGE
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Dispatched when a property of the channel set changes.
ThePropertyChangeEvent.PROPERTY_CHANGE
constant defines the value of the
type
property of the event object for a PropertyChange
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | Determined by the constructor; defaults to false. |
cancelable | Determined by the constructor; defaults to false. |
kind | The kind of change; PropertyChangeEventKind.UPDATE or PropertyChangeEventKind.DELETE. |
oldValue | The original property value. |
newValue | The new property value, if any. |
property | The property that changed. |
source | The object that contains the property that changed. |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
Tue Jun 12 2018, 03:47 PM Z