Class: SC.Async
Extends
SC.Object.
Represents a call that is intended to be asynchronous. This is used during a state transition process when either entering or exiting a state.
Defined in: async.js
Field Summary
- Fields borrowed from SC.Object:
- concatenatedProperties, isDestroyed, isObject, nextProperty, object, property, target, toInvalidate
- Fields borrowed from SC.Observable:
- isObservable
Class Methods
- Methods borrowed from SC.Object:
- activate, awake, deactivate, destroy, emitDesign, encodeDesign, init, instanceOf, invokeLast, invokeLater, invokeNext, invokeOnce, invokeOnceLater, invokeWith, kindOf, mixin, notifyPropertyDidChange, respondsTo, superclass, toString, tryToPerform
- Methods borrowed from SC.Observable:
- addObserver, addObservesHandler, addProbe, allPropertiesDidChange, automaticallyNotifiesObserversFor, beginPropertyChanges, bind, decrementProperty, destroyObservable, didChangeFor, endPropertyChanges, get, getEach, getPath, hasObserverFor, incrementProperty, initObservable, logProperty, notifyPropertyChange, observersForKey, propertyDidChange, propertyWillChange, registerDependentKey, removeObserver, removeObservesHandler, removeProbe, set, setIfChanged, setPath, setPathIfChanged, toggleProperty, unknownProperty
Class Method Detail
perform(func, arg1, arg2)
Call in either a state's enterState
or exitState
method when you
want a state to perform an asynchronous action, such as an animation.
Examples:
SC.State.extend(
{
enterState: function() {
return SC.Async.perform('foo');
},
exitState: function() {
return SC.Async.perform('bar', 100);
}
foo: function() { ... },
bar: function(arg) { ... }
});
- Parameters:
- func
- {String|Function} the function to be invoked on a state
- arg1
- Optional. An argument to pass to the given function
- arg2
- Optional. An argument to pass to the given function
- Returns:
- SC.Async
- a new instance of a SC.Async
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Feb 03 2015 13:12:19 GMT+0100 (CET)