LnkWcb Framework

LnkWcb  2.5.0

LnkWcb Framework > LnkWcb > LnkWcb.Event
Search:
 
Filters

private Class LnkWcb.Event

Event abstraction class.

Constructor

LnkWcb.Event ( target )
Parameters:
target <Object> the source of the event, i.e. the object used as this when calling any listeners.

Properties

rethrow - private boolean

Controls whether exceptions from listeners are re-thrown or not. If true and a listener throws an exception, then all subsequent listeners won't get called.

Methods

fire

void fire ( )
Fire an event.

All registered listeners are sequentially called, in the order they were registered. Whenever a listener returns the (exact) false value, then no further listeners are called.

Exceptions are caught and logged (if any logger was previously defined). They are thrown again if the rethrow property is true for this event instance.


register

void register ( l )
Register a listener.
Parameters:
l <Function> the listener

unregister

protected void unregister ( l )
Unregister a listener.
Parameters:
l <Function> the listener


Copyright © 2010 Linkeo.com All rights reserved.