Core.Web.Library
Group
Class Hierarchy:

A representation of a group of libraries to be loaded at the same time. Libraries will be retrieved asynchronously, and then installed once ALL the libraries have been retrieved. Installation will be done in the order in which the add() method was invoked to add libraries to the group (without regard for the order in which the HTTP server returns the library code).

Constructor Summary
Public Core.Web.Library.Group()
Creates a new library group.

Instance Field Summary
Internal _listenerList
Internal _libraries
Internal _loadedCount
Internal _totalCount

Instance Method Summary
Public add()
Adds a library to the library group.
Public addLoadListener()
Adds a listener to be notified when all libraries in the group have been loaded.
Internal _fireLoadEvent()
Notifies listeners of completed library loading.
Public hasNewLibraries()
Determines if this library group contains any new (not previously loaded) libraries.
Internal _install()
Installs all libraries in the group.
Internal _notifyRetrieved()
Event listener invoked when a single library has been successfully retrieved.
Public load()
Initializes library loading.
Public removeLoadListener()
Removes a listener from being notified when all libraries in the group have been loaded.

Constructor Detail
Core.Web.Library.Group()
Creates a new library group.

Instance Method Detail
add
Adds a library to the library group. Libraries which have previously been loaded will not be loaded again.
Parameters:
libraryUrl - the URL from which to retrieve the library.

addLoadListener
Adds a listener to be notified when all libraries in the group have been loaded.
Parameters:
l (Function) - the listener to add

_fireLoadEvent
Notifies listeners of completed library loading.

hasNewLibraries
Determines if this library group contains any new (not previously loaded) libraries.
Returns:
(Boolean) true if any new libraries exist

_install
Installs all libraries in the group. This method is invoked once all libraries have been successfully retrieved. It will invoke any registered load listeners once the libraries have been installed.

_notifyRetrieved
Event listener invoked when a single library has been successfully retrieved. When all libraries have been retrieved, this method will invoke _install().

load
Initializes library loading. When this method is invoked the libraries will be asynchronously loaded. This method will return before the libraries have been loaded. Once this method has been invoked, add() may no longer be invoked.

removeLoadListener
Removes a listener from being notified when all libraries in the group have been loaded.
Parameters:
l (Function) - the listener to remove