Injector gives warning rule already exists, how to find out the reason?

Weyert's Avatar

Weyert

26 May, 2011 10:18 AM

I am having three views which all are mapped to the same mediator via:

    mediatorMap.mapView(VideoSequenceItemView, SequenceItemViewMediator);
    mediatorMap.mapView(ImageSequenceItemView, SequenceItemViewMediator);
    mediatorMap.mapView(ModuleSequenceItemView, SequenceItemViewMediator);

Because the logic for all the views are the same and the view itself is responsible for doing his action e.g. loading an image, play a video etc. Only I am keep getting the following warning:

   Warning: Injector already has a rule for type "ch.nothing.sequence.views::SequenceItemViewMediator", named "".

I am curious if this caused by the mappings above or somewhere? I can't really find any place in my code where I make a mapping for this class.
Can I safely ignore this error or can it have side effects?

  1. 1 Posted by Stray on 26 May, 2011 10:55 AM

    Stray's Avatar

    Hi Weyert, you can safely ignore it.

    Injector warnings were added recently to SS. This caused us to realise there were a few places where unnecessary injector mappings were being made. In fact, the mediator isn't going to be mapped in to the injector at all from 1.7. There is a patch for this already on my RL fork, we just have one other thing to deal with before we make a new official swc. (Again, this is only to do with warnings, not a breaking issue).

    So - feel free to ignore it, or if you are building from source you can download my fork.

    Stray

  2. Stray closed this discussion on 07 Jun, 2011 01:18 PM.

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