Name

LzIdleClass — Idle service.

Synopsis

JavaScript: LzIdleClass
Type: Class
Access: public
Topic: LFC.Services
Declared in: WEB-INF/lps/lfc/services/LzIdle.lzs

Description

The OpenLaszlo runtime generates idle events at some fixed, unspecified frequency. Here is a simple example that shows how to receive the onidle event:

 <canvas height="140" debug="true">
 
   <attribute name="counter" value="0"/>
   <handler name="onidle" reference="LzIdle">
     while (counter &lt; 4) {
       counter++;
       Debug.write("idling  " + counter);
     }
   </handler>
 </canvas>
 
 

Development Note

This object sends an 'onidle' event when there is no synchronous script running after each frame update.

Superclass Chain

LzIdleClass

Known Subclasses

Details

Properties (2)

coi
public var coi;
removeCOI
public var removeCOI = null;

Methods (4)

callOnIdle()
public function callOnIdle(d : LzDelegate);
Calls the given delegate at the next idle event. This can be used for a non- recursive callback.
initialize()
public function initialize();
removeCallIdleDelegates()
private function removeCallIdleDelegates(t);
toString()
public function toString();

Events (1)

onidle
public event onidle;
This is the idle event for the system, sent by this service

JavaScript Synopsis

public LzIdleClass {
  public var coi ;
  public var removeCOI  = null;
  prototype public function callOnIdle (d : LzDelegate);
  prototype public function initialize ();
  prototype public event onidle ;
  prototype private function removeCallIdleDelegates (t);
  prototype public function toString ();
}