Modular Robotlegs 2 -- How to?

I've seen this discussion passing a few times before, but all of
the examples/solutions I can find were written with an older
version/implementation of the config files, which got me pretty
confused.

What I'm trying to do is:
I made a very basic application which loads modules (just one, in
this case).
I assume that every module should have its own Config file, which
maps its own mediators, commands, etc etc.

Now, the module loader seems to be working correct (I THINK),
but I think I am loading my config file in the first module in the
wrong way.
I know there are a lot of ways to use modules in an app, but I
would like to have my module 'hooking up' with the shell, so I can
just dispatch events 'everywhere'.
I just want to keep the advantage that when I will "disable" (or
just: 'not load') a module one day, my main file isn't 3MB because
of a part that's not being used anymore.

So can someone please help me out here?
If I can get a clean implementation, I will finish this and maybe
we can add this project to the RL2 examples afterwards if you'd
like.

Error: Child context Context-1-43 must be uninitialized
at robotlegs.bender.extensions.vigilance::VigilanceExtension/log()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/extensions/vigilance/VigilanceExtension.as:50]
at robotlegs.bender.framework.impl::LogManager/log()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/LogManager.as:89]
at robotlegs.bender.framework.impl::Logger/warn()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/Logger.as:70]
at robotlegs.bender.framework.impl::Context/addChild()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/Context.as:321]
at robotlegs.bender.extensions.modularity.impl::ViewManagerBasedExistenceWatcher/onContextAdd()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/extensions/modularity/impl/ViewManagerBasedExistenceWatcher.as:98]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
at robotlegs.bender.extensions.modularity::ModularityExtension/broadcastContextExistence()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/extensions/modularity/ModularityExtension.as:95]
at robotlegs.bender.extensions.modularity::ModularityExtension/beforeInitializing()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/extensions/modularity/ModularityExtension.as:82]
at MessageRunner/next()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/MessageDispatcher.as:144]
at MessageRunner/run()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/MessageDispatcher.as:127]
at robotlegs.bender.framework.impl::MessageDispatcher/dispatchMessage()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/MessageDispatcher.as:79]
at robotlegs.bender.framework.impl::LifecycleTransition/enter()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/LifecycleTransition.as:191]
at robotlegs.bender.framework.impl::Lifecycle/initialize()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/Lifecycle.as:148]
at robotlegs.bender.framework.impl::Context/initialize()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/Context.as:154]
at robotlegs.bender.extensions.stageSync::StageSyncExtension/initializeContext()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/extensions/stageSync/StageSyncExtension.as:85]
at robotlegs.bender.extensions.stageSync::StageSyncExtension/handleContextView()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/extensions/stageSync/StageSyncExtension.as:67]
at ObjectHandler/handle()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/ObjectProcessor.as:89]
at robotlegs.bender.framework.impl::ObjectProcessor/processObject()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/ObjectProcessor.as:48]
at robotlegs.bender.framework.impl::ConfigManager/addConfig()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/ConfigManager.as:91]
at robotlegs.bender.framework.impl::Context/configure()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/framework/impl/Context.as:308]
at robotlegs.bender.mxml::ContextBuilderTag/configureBuilder()[/Users/admin/FlexWorkspace/robotlegs/src/robotlegs/bender/mxml/ContextBuilderTag.as:103]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

(To me it seems like a contradiction that the VigilanceExtension
is dispatching this error allthough the ModularityExtension is
installed by default. But I'm probably looking in the wrong
direction anyway...)

Are there any tips, or is it just me making no sense at all?

Also, I don't know but in Shell.as, on line 34 I load my module
like this:moduleInfo.load( null, null, null, moduleFactory
);

Maybe I should usemoduleInfo.load( ApplicationDomain.currentDomain, null, null,
moduleFactory ); instead? (however, for the moment both are
giving me the same error).

I haven't had a chance to look at your sample application yet,
but that initialization check was added fairly recently, so it's
entirely possible that this is my fault! I think there is a timing
issue here.

When a child context is added to a parent context, that child
must be uninitialized to ensure that it inherits everything it
needs from the parent before it starts up. Otherwise it
might create it's own mappings for things that it should be
inheriting and by then it would be too late to change.

Thanks for putting the sample together - it should help me
figure out what is going on here (I suspect it's due to a delay
that I added to the ContextBuilderTag).

I've committed a fix to the Modularity Extension - it was
previously locked in an impossible situation where a module would
only broadcast its existence during initialization.. but by then it
was too late!

This fix will be released in the next Beta. In the meantime you
can checkout the source from GitHub.