Ambiguous reference to mediatorMap

Peder's Avatar


30 Mar, 2011 10:51 AM


I'm getting 'Ambiguous reference to mediatorMap'. I have baked in @piercer's ViewInterfaceMediatorMap into a context class that my main context class extends. Seems like you solved it her:

What was the trick?

  1. 1 Posted by Peder on 30 Mar, 2011 11:11 AM

    Peder's Avatar

    Just saw this post which "solved" it

    I tried to use @piercer's
    override protected function get mediatorMap():IMediatorMap

      return _mediatorMap ||= new ViewInterfaceMediatorMap(contextView, createChildInjector(), reflector);


    in a context class that my main context subclassed, but worked if I set the initialization in the constructor

    _mediatorMap = new ViewInterfaceMediatorMap(contextView, createChildInjector(), reflector); super(contextView, autoStartup);

    But would be best if I could overwrite the getter. Any better solutions?

  2. 2 Posted by Abel de Beer on 30 Mar, 2011 02:01 PM

    Abel de Beer's Avatar

    Hey Peder,

    It's a best practice to create a custom Context class which subclasses the default Context. Using the getter override described above would then work as expected.

    • Abel.
  3. 3 Posted by Peder on 30 Mar, 2011 02:09 PM

    Peder's Avatar

    Thx, but that's what I do. It's the same issue as this post

    I have a custom sub class of SignalContext which overrides the mediatorMap getter, but get 'Ambiguous reference to mediatorMap'.

    Works when I set the value of mediatorMap in constructor. So I can get it to work, but would rather like to override the getter.

  4. 4 Posted by Abel de Beer on 30 Mar, 2011 06:34 PM

    Abel de Beer's Avatar

    This example works for me:

    You could try copying the entire code and then testing it...?

  5. Stray closed this discussion on 02 May, 2011 01:17 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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