From 3da5425f97c8e09f8839a41e1849575083346732 Mon Sep 17 00:00:00 2001 From: probertson Date: Sat, 8 Jan 2011 11:32:51 -0600 Subject: [PATCH] Add documentation for the startupComplete event dispatched by the Context.startup() method. The docs describe a common pattern for using the startupComplete event to trigger traditional "app entrypoint" bootstrapping operations. --- src/org/robotlegs/mvcs/Context.as | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/org/robotlegs/mvcs/Context.as b/src/org/robotlegs/mvcs/Context.as index ba36381e..56ebcc57 100644 --- a/src/org/robotlegs/mvcs/Context.as +++ b/src/org/robotlegs/mvcs/Context.as @@ -28,6 +28,39 @@ package org.robotlegs.mvcs import org.robotlegs.core.IReflector; import org.robotlegs.core.IViewMap; + /** + * Dispatched by the startup() method when it finishes + * executing. + * + *

One common pattern for application startup/bootstrapping makes use + * of the startupComplete event. In this pattern, you do the + * following:

+ * + * + * @eventType org.robotlegs.base.ContextEvent.STARTUP_COMPLETE + * + * @see #startup() + */ + [Event(name="startupComplete", type="org.robotlegs.base.ContextEvent")] + + /** * Abstract MVCS IContext implementation */ @@ -98,6 +131,14 @@ package org.robotlegs.mvcs * The Startup Hook * *

Override this in your Application context

+ * + * @event startupComplete ContextEvent.STARTUP_COMPLETE Dispatched at the end of the + * startup() method's execution. This + * is often used to trigger startup/bootstrapping + * commands by wiring them to this event and + * calling super.startup() in the + * last line of your startup() + * override. */ public function startup():void {