| Package | org.mvcexpress.core |
| Class | public class ModuleMovieClip |
| Inheritance | ModuleMovieClip flash.display.MovieClip |
It inits framework and lets you set up your application. (or execute Cammands that will do it.) Also you can create modular application by having more then one module.
| Property | Defined By | ||
|---|---|---|---|
| moduleName : String [read-only]
Name of the module
| ModuleMovieClip | ||
| Property | Defined By | ||
|---|---|---|---|
| commandMap : CommandMap | ModuleMovieClip | ||
| mediatorMap : MediatorMap | ModuleMovieClip | ||
| proxyMap : ProxyMap | ModuleMovieClip | ||
| Method | Defined By | ||
|---|---|---|---|
ModuleMovieClip(moduleName:String = null, autoInit:Boolean = true, initOnStage:Boolean = true)
CONSTRUCTOR
| ModuleMovieClip | ||
disposeModule():void
Function to get rid of module. | ModuleMovieClip | ||
listMappedCommands():String
List all controller mappings. | ModuleMovieClip | ||
listMappedMediators():String
List all view mappings. | ModuleMovieClip | ||
listMappedProxies():String
List all model mappings. | ModuleMovieClip | ||
| Method | Defined By | ||
|---|---|---|---|
initModule():void
Initializes module. | ModuleMovieClip | ||
onDispose():void
Function called before module is destroyed. | ModuleMovieClip | ||
onInit():void
Function called after framework is initialized. | ModuleMovieClip | ||
sendMessage(type:String, params:Object = null, targetAllModules:Boolean = false):void
Message sender. | ModuleMovieClip | ||
| commandMap | property |
protected var commandMap:CommandMap| mediatorMap | property |
protected var mediatorMap:MediatorMap| moduleName | property |
moduleName:String [read-only] Name of the module
public function get moduleName():String| proxyMap | property |
protected var proxyMap:ProxyMap| ModuleMovieClip | () | Constructor |
public function ModuleMovieClip(moduleName:String = null, autoInit:Boolean = true, initOnStage:Boolean = true)CONSTRUCTOR
ParametersmoduleName:String (default = null) — module name that is used for referencing a module. (if not provided - unique name will be generated.)
| |
autoInit:Boolean (default = true) — if set to false framework is not initialized for this module. If you want to use framework features you will have to manually init() it first.
(or you start getting null reference errors.)
| |
initOnStage:Boolean (default = true) — defines if module should init only then it is added to stage or not. By default it will wait for Event.ADDED_TO_STAGE before calling onInit(). If autoInit is set to false, this parameters is ignored.
|
| disposeModule | () | method |
public function disposeModule():voidFunction to get rid of module. - All module cammands are unmapped. - All module mediators are unmediated - All module proxies are unmapped - All internals are nulled.
| initModule | () | method |
protected function initModule():voidInitializes module. If this function is not called module will not work properly. By default it is called in constructor, but you can do it manually if you set constructor parameter 'autoInit' to false.
| listMappedCommands | () | method |
public function listMappedCommands():StringList all controller mappings.
ReturnsString |
| listMappedMediators | () | method |
public function listMappedMediators():StringList all view mappings.
ReturnsString |
| listMappedProxies | () | method |
public function listMappedProxies():StringList all model mappings.
ReturnsString |
| onDispose | () | method |
protected function onDispose():voidFunction called before module is destroyed. Meant to be overridden.
| onInit | () | method |
protected function onInit():voidFunction called after framework is initialized. Meant to be overridden.
| sendMessage | () | method |
protected function sendMessage(type:String, params:Object = null, targetAllModules:Boolean = false):voidMessage sender.
Parameters
type:String — type of the message. (Commands and handle functions must bu map to it to react.)
| |
params:Object (default = null) — Object that will be send to Command execute() or to handle function as parameter.
| |
targetAllModules:Boolean (default = false) — if true, will send message to all existing modules, by default message will be internal for current module only.
|