ServiceEvent
Kind of class: | public class |
---|---|
Package: | |
Inherits from: |
|
Classpath: | org.asaplibrary.data.xml.ServiceEvent |
File last modified: | Friday, 13 May 2011, 22:20:34 |
Event class for use with the Service class. Listen to the generic event type to receive these events.
The event has room for both a list of objects as result of a load operation, or a single object. It is left to the implementation of an extension of Service to determine which of these are used.
Example
-
myService.addEventListener(ServiceEvent._EVENT, handleServiceEvent);
Summary
Constructor
- ServiceEvent (inSubtype:String, inName:String = null, inList:Array = null, inObject:Object = null, inError:String = null)
Constants
-
_EVENT
: String
- Generic type of event
-
COMPLETE
: String
- subtype of event sent when loading and parsing went ok
-
ALL_COMPLETE
: String
- subtype of event sent when all requests have completed; does not check for errors
Class properties
-
LOAD_ERROR
: String
- subtype of event sent when there was an error loading the data
-
PARSE_ERROR
: String
- subtype of event sent when there was an error parsing the data
Instance properties
Constructor
ServiceEvent
function ServiceEvent(inSubtype:String,
inName:String = null,
inList:Array = null,
inObject:Object = null,
inError:String = null)
Constants
ALL_COMPLETE
static const ALL_COMPLETE:String = "allLoadComplete"
subtype of event sent when all requests have completed; does not check for errors
COMPLETE
static const COMPLETE:String = "loadComplete"
subtype of event sent when loading and parsing went ok
_EVENT
static const _EVENT:String = "onServiceEvent"
Generic type of event
Class properties
LOAD_ERROR
static LOAD_ERROR:String = "loadError"(read,write)
subtype of event sent when there was an error loading the data
PARSE_ERROR
static PARSE_ERROR:String = "parseError"(read,write)
subtype of event sent when there was an error parsing the data
Instance properties
error
error:String(read,write)
if applicable, a string describing the error
list
list:Array(read,write)
if applicable, a single array of typed data objects
name
name:String(read,write)
name of original request
object
object:Object(read,write)
if applicable, a single object
subtype
subtype:String(read,write)
subtype of event
Instance methods
clone
override function clone() : Event
Overrides
- Event.clone
toString
override function toString() : String
Overrides
- Event.toString