Modular Robot Legs
I am messing around with the Modular Utility written by Joel Hooks and I got a few warnings that I am not sure why I am getting them.
In my main context I have the following:
viewMap.mapType(IntroScreenModule);
in my IntroScreenModule I have the following based on Joel Hooks
example:
module Tag
implements="org.robotlegs.utilities.modular.core.IModule"
in the script tag
`[Inject]
public function set parentInjector(value:IInjector):void
{
context = new IntroModuleContext(this, value);
}
public function dispose():void
{
context.dispose();
context = null;
}`
my errors
3590: org.robotlegs.core:IInjector used where a Boolean
value was expected. The expression will be type coerced to
Boolean.
and
com.modules.intro.screen:IntroScreenModule is a module or
application that is directly referenced. This will cause
com.modules.intro.screen:IntroScreenModule and all of its
dependencies to be linked in with ProjectShell. Using an interface
is the recommended practice to avoid this'
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ondina D.F. on 04 Aug, 2011 06:08 PM
Hi Joe,
I’m not sure, but maybe you have added the Module directly to your application
<module:SomeModuleModule /> instead of using a loader
and defined a namespace:
xmlns: module ="yourpath.modules.*"
In this case you are referencing it directly instead of using an interface.
Make a simple application, where you load a module 1. by placing it directly in the mxml and defining a namespace and 2. using a ModuleLoader to see if in the second case the error disappears.
But that’s all I can tell you, because I haven’t used the modular utility and I can’t try the demo right now. Hopefully someone else will help you to sort out the issue.
Also search the forum for “modular”, maybe you’ll find an answer in one of the threads.
And look at the http://knowledge.robotlegs.org/discussions/examples/6-links-to-robo..., maybe there are other modular demos as well.
Cheers,
Ondina
2 Posted by visnik on 09 Aug, 2011 08:53 PM
Ok,
I was able to get the
error to go away, but I am still getting this warning:
3590: org.robotlegs.core:IInjector used where a Boolean value was expected. The expression will be type coerced to Boolean. IntroScreenModule.mxml
Of course Joel's ModularDoodads example is not pulling up the error so I am missing something. So what I did what place my code side by side to his. I am not sure if this warning will actually impact anything, but I'll show you all what I have so far.
Joel's Code
Main Applicaion ModularDoodads.mxml
doodadHolder being a group container, DoodadModule, is of course the module being loaded in.
My Code within my MainApp.mxml
moduleContainer_group being a group container, IntroScreenModule, is the module being loaded in.
Joel's ModularDoodadscontext
My MainAppContext
the mapModules() method is called from within my startup() method within the context.
now the module's and where I get the warning.
Joel's code in his DoodadModule.mxml
My code within my IntroScreenModule.mxml and where I get the warning.
In the context for the module I have not yet mapped anything, all I did was extend the ModuleContext as stated to do so with all contexts. For the most part I am trying to duplicate a fairly near 1:1 as to how Joel suggest using his Modular utility, but I get the warnning and his code does not.
If anyone is familar with his modular utility and or the example located here, please let me know what I am missing as i have been going back and forth with this for days trying to figure it out.
Thanks,
OH and sorry for such a long post!
3 Posted by visnik on 09 Aug, 2011 11:48 PM
OK, well it seems i figured out the 3590: org.robotlegs.core:IInjector used where a Boolean value was expected. The expression will be type coerced to Boolean. IntroScreenModule.mxml warning.
It would seems as though I need to pass in 3 parameters when creating a new IntroModuleContext, instead of
i need
visnik closed this discussion on 10 Aug, 2011 11:21 PM.