why not pass priority and useWeakReference to the addViewListener and addContextListener function in Mediator
Hi
I find that the mapListener function in IEventMap cound accept this two arguments,so why doesn't Mediator accept and pass them to IEventMap?
Sorry for my poor English and thanks for this great framework.
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 25 Jul, 2014 09:13 AM
Hi,
You have 2 options:
In my experience, having useWeakReference set to true is a good thing almost always, and I can't think of a scenario where the opposite were desirable for a Mediator's event listener. As for the priorities of event listeners, personally, I try to avoid relying on a specific order of execution of event listeners. More often than not, there are other architectural solutions to that problem. I'm curious as to why you need to change those parameters. What is your special/particular use case?
Ondina
2 Posted by airycanon on 29 Jul, 2014 01:18 AM
Hi Ondina,
In my use case,both mediatorA and mediatorB have the same event listeners,and i need to make mediatorA's event handler happen first,as you said there are other solutions to this problem,thanks for your replies.
Support Staff 3 Posted by Ondina D.F. on 30 Jul, 2014 08:15 AM
No problem:)
Ondina D.F. closed this discussion on 30 Jul, 2014 08:15 AM.