Packageorg.mvcexpress.core
Classpublic class ModuleMovieClip
InheritanceModuleMovieClip Inheritance flash.display.MovieClip

Core Module class as 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.



Public Properties
 PropertyDefined By
  moduleName : String
[read-only] Name of the module
ModuleMovieClip
Protected Properties
 PropertyDefined By
  commandMap : CommandMap
ModuleMovieClip
  mediatorMap : MediatorMap
ModuleMovieClip
  proxyMap : ProxyMap
ModuleMovieClip
Public Methods
 MethodDefined By
  
ModuleMovieClip(moduleName:String = null, autoInit:Boolean = true, initOnStage:Boolean = true)
CONSTRUCTOR
ModuleMovieClip
  
Function to get rid of module.
ModuleMovieClip
  
List all controller mappings.
ModuleMovieClip
  
List all view mappings.
ModuleMovieClip
  
List all model mappings.
ModuleMovieClip
Protected Methods
 MethodDefined 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
Property Detail
commandMapproperty
protected var commandMap:CommandMap

mediatorMapproperty 
protected var mediatorMap:MediatorMap

moduleNameproperty 
moduleName:String  [read-only]

Name of the module


Implementation
    public function get moduleName():String
proxyMapproperty 
protected var proxyMap:ProxyMap

Constructor Detail
ModuleMovieClip()Constructor
public function ModuleMovieClip(moduleName:String = null, autoInit:Boolean = true, initOnStage:Boolean = true)

CONSTRUCTOR

Parameters
moduleName: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.
Method Detail
disposeModule()method
public function disposeModule():void

Function 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():void

Initializes 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():String

List all controller mappings.

Returns
String
listMappedMediators()method 
public function listMappedMediators():String

List all view mappings.

Returns
String
listMappedProxies()method 
public function listMappedProxies():String

List all model mappings.

Returns
String
onDispose()method 
protected function onDispose():void

Function called before module is destroyed. Meant to be overridden.

onInit()method 
protected function onInit():void

Function called after framework is initialized. Meant to be overridden.

sendMessage()method 
protected function sendMessage(type:String, params:Object = null, targetAllModules:Boolean = false):void

Message 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.