tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/211-non-view-modulesRobotlegs: Discussion 2018-10-18T16:35:14Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/22061312010-07-08T19:47:28Z2010-07-08T19:47:28Znon-view modules<div><p>create module with injector.instantiate(MyModule) (or
getInstance(MyModule) if it has been mapped). The real shitty bit
here is that you have to supply a contextView, so with a non-view
module you need to give it a new Sprite(). You also don't get any
automatic mediation of views created in a module and have to
manually mediate view components.</p>
<p>Either way, it isn't as weird as pipes :P</p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/22061312010-07-08T20:06:03Z2010-07-08T20:06:07Znon-view modules<div><p>thanks for the quick response Joel.</p>
<p>No, I needed a week for my head to stop hurting after using
pipes :)</p>
<p>Another question that springs to mind is what if the module is
loaded dynamically at runtime?</p></div>neil manuelltag:robotlegs.tenderapp.com,2009-10-18:Comment/22061312010-07-08T22:09:07Z2010-07-08T22:09:07Znon-view modules<div><p>It isn't really any different from what I describe. You need to
grab a hook in the loaded module and give it the parent injector so
it can do its business. Load it at runtime, pass it the
injector.</p>
<p>I'd probably consider some sort of module loading service/model
to manage and control all of that for me.</p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/22061312010-07-08T22:16:55Z2010-07-08T22:16:59Znon-view modules<div><p>OK, cheers Joel, will give that a go.<br>
its all a bit Voodoo to me... but i'm getting there</p></div>neil manuelltag:robotlegs.tenderapp.com,2009-10-18:Comment/22061312010-07-08T22:22:44Z2010-07-08T22:22:44Znon-view modules<div><p>you can hit my up anytime man, I got Skype and IM up all day and
night :></p>
<p>Always down to talk some robotlegs!</p></div>Joel Hookstag:robotlegs.tenderapp.com,2009-10-18:Comment/22061312010-07-09T07:35:41Z2010-07-09T07:35:41Znon-view modules<div><p>thanks Joel,</p>
<p>you must answer a lot of questions :)</p>
<p>I had another look at your doodads, and I've got the theory,
just need to put it into practice.</p>
<p>thanks again</p></div>neil manuell