Autorun

ceramic.Entitytracker.Autorun (Class)

Static Members

current: Autorun

unobserve(): Void

Ensures current autorun won't be affected by the code after this call. reobserve() should be called to restore previous state.


reobserve(): Void

Resume observing values and resume affecting current autorun scope. This should be called after an unobserve() call.


cease(): Void

Unbinds and destroys current autorun. The name cease() has been chosed there so that it is unlikely to collide with other more common names suchs as stop, unbind etc... and should make it more recognizable, along with observe() and unobserve().


unobserved(func: Function): Void

Executes the given function synchronously and ensures the current autorun scope won't be affected

Name Type
func Function

invalidateAutorunArray(autorunArray: Array<Autorun>): Void
Name Type
autorunArray Array<Autorun>

getAutorunArray(): Array<Autorun>
Returns
Array<Autorun>

recycleAutorunArray(array: Array<Autorun>): Void
Name Type
array Array<Autorun>

getArrayOfAutorunArrays(): Array<Array<Autorun>>
Returns
Array<Array<Autorun>>

recycleArrayOfAutorunArrays(array: Array<Array<Autorun>>): Void
Name Type
array Array<Array<Autorun>>

Instance Members

invalidated: Bool

destroy(): Void

run(): Void

invalidate(): Void

bindToAutorunArray(autorunArray: Array<Autorun>): Void
Name Type
autorunArray Array<Autorun>

unbindFromAllAutorunArrays(): Void

new(onRun: Function, ?afterRun: Function): Void

Initialize a new autorun.

Name Type Default Description
onRun Function The callback that will be executed and used to compute implicit bindings
afterRun Function (optional) * (optional) A callback run right after onRun, not affecting implicit bindings. Useful when generating side effects without messing up binding dependencies.

Private Members

prevCurrent: Array<Autorun>

boundAutorunArrays: Array<Array<Autorun>>

emitReset(): Void

reset event


willEmitReset(): Void

Metadata

Name Parameters
:build ceramic.macros.EntityMacro.buildForCompletion()
:autoBuild ceramic.macros.EntityMacro.buildForCompletion()
:build tracker.macros.EventsMacro.build()
:autoBuild tracker.macros.EventsMacro.build()