Event

From Web Computing Documentation
Revision as of 13:21, 16 August 2011 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

class Event <T> implements PublicEvent<T>

  • henkolib
    • henkolib.events
      • henkolib.events.Event

Class overview

Represents an Event with customizable arguments. Should be kept private in the class that invokes it. Use the PublicSimpleEvent interface for publishing the event.

Public functions

new ()

subscribe (func : T->Void)

func Callback function.

Subscribes the given callback function to the Event.

unsubscribe (func : T->Void)

func Callback function.

Unsubscribes the given callback function to the Event.

invoke (arg : T)

arg The object to pass to callback functions.

Invokes the Event by calling all subscribed callback functions with the given parameter.

Personal tools
Modules