Name
LzInstantiatorClass — Handles application instantiation.
Description
The instantiator is responsible for timing the creation and initialization of Laszlo applications. Because of Laszlo's declarative
style, applications must be instantiated in two passes -- one where all of the objects are created and another where all of
the references are resolved. This ensures that order rarely matters in an lzx file, and allows objects to refer to one another
without making the programmer worry about initialization order or messy callbacks.
If an OpenLaszlo application is slow to instantiate, LzNodes supply the initstage attribute. The instantiator also has a few exposed methods and attributes that can be used to control the instantiation behavior
of a Laszlo app.
Superclass Chain
LzInstantiatorClass
Details
Properties (13)
-
checkQDel
-
public var checkQDel = null;
-
halted
-
public var halted = false;
-
isdatareplicating
-
public var isdatareplicating = false;
-
isimmediate
-
public var isimmediate = false;
-
istrickling
-
public var istrickling = false;
-
isUpdating
-
public var isUpdating = false;
-
makeQ
-
-
safe
-
-
syncNew
-
public var syncNew = true;
-
timeout
-
public var timeout : Number = 500;
The length of time in miliseconds to spend
synchronously creating nodes before allowing an idle event to pass.
By default this is 500.
-
trickleQ
-
-
trickletime
-
public var trickletime : Number = 10;
The length of time to spend creating initstage=
"late" nodes before allowing an idle event to pass. By default this
is 10 miliseconds.
-
tricklingQ
-
Methods (16)
-
checkQ()
-
private function checkQ();
-
checkUpdate()
-
private function checkUpdate();
-
clearDataReplicationQueue()
-
private function clearDataReplicationQueue();
-
completeTrickle()
-
private function completeTrickle(v);
-
createImmediate()
-
private function createImmediate(v, children);
-
drainQ()
-
private function drainQ(limit);
Used by Krank to instantiate all views before kranking
-
enableDataReplicationQueuing()
-
private function enableDataReplicationQueuing();
-
halt()
-
Stops the instantiatior until
resume
is called.
-
initialize()
-
public function initialize();
-
makeSomeViews()
-
private function makeSomeViews(cq, otime);
-
newReverseArray()
-
private function newReverseArray(arr);
-
requestInstantiation()
-
private function requestInstantiation(v : LzView, children);
Instantiate the child array for a view. This will be instantiated
immediately, normally, or on the trickly depending on the state of the
service
-
resume()
-
public function resume();
Restarts the instantiatior after it is stopped with
halt
-
setSafeInstantiation()
-
private function setSafeInstantiation(isSafe);
-
traceQ()
-
private function traceQ();
-
trickleInstantiate()
-
private function trickleInstantiate(v, children);
JavaScript Synopsis
public
LzInstantiatorClass {
prototype private function
checkQ
();
prototype private function
drainQ
(
limit);
prototype public function
halt
();
prototype public function
resume
();
prototype private function
traceQ
();
}