View manager. Administrates optional Nasal view handlers.
Usage: view.manager.register(<view-id>, <view-handler>);
view-id: the view's name (e.g. "Chase View") or index number
view-handler: a hash with any combination of the functions listed in the
following example, or none at all. Only define the interface
functions that you really need! The hash may contain local
variables and other, non-interface functions.
Example:
var some_view_handler = {
init : func {}, # called only once at startup
start : func {}, # called when view is switched to our view
stop : func {}, # called when view is switched away from our view
reset : func {}, # called with view.resetView()
update : func { 0 }, # called iteratively if defined. Must return
}; # interval in seconds until next invocation
# Don't define it if you don't need it!
view.manager.register("Some View", some_view_handler);