Warning: Injector already has a rule for type

mike's Avatar

mike

06 Oct, 2012 12:45 PM

I have a bunch of warning messages like this appear when using Robotlegs/Signals. Everytime this command class executes, which is every 2-3 seconds ..this message displays below

If you have overwritten this mapping intentionally you can use "injector.unmap()" prior to your replacement mapping in order to avoid seeing this message. Warning: Injector already has a rule for type "mx.messaging.messages::IMessage", named "".

The command functions fine otherwise but I think I'm doing something wrong anyhow.

public class MessageReceivedCommand extends SignalCommand
{

    [Inject]
    public var message:IMessage;

        ...etc.. do something with message..
}

the application context doesnt map IMessage to this command, as I only see an option to mapSignalClass , besides the payload is received fine.

Wonder if anyone knows how I might either fix or suppress this message. I've tried calling this as the warning suggests

injector.unmap(IMessage, "")
but I receive an error - no mapping found for ::IMessage named "".

Thanks

  1. Support Staff 1 Posted by Ondina D.F. on 08 Oct, 2012 08:59 AM

    Ondina D.F.'s Avatar

    Hello,

    Sorry for the late response, I was away over the weekend.

    -Could you post the code for the mappings?

    -Could it be that you’re using an older version of the SignalCommandMap? I’m not sure, but the warning you’re getting was reported by other users too, and it might be related to a bug in older versions?

    Ondina

  2. Ondina D.F. closed this discussion on 15 Oct, 2012 08:39 AM.

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