rafalszemraj / fabrication

Automatically exported from code.google.com/p/fabrication
2 stars 1 forks source link

Only one mediator of same type actually works #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create and assign two mediators of same class to two components
2. Try to use the second mediator

What is the expected output? What do you see instead?
Second mediator only traces from it's constructor, nothing else (including 
onRegister) is fired.

What version of the product are you using? On what operating system?
Fabrication 0.8.3 - as3
PureMVC AS3 Multicore 1.0.5
Pipes 1.1
Flash Player 10.1
FlashDevelop 3.2.2
Windows XP

Please provide any additional information below.
This time I do my homework and attach an example. Click a textfield to fire a 
notification. Only first mediator gets it. Switch order in which they are 
instantiated and mediator of the second textField will get it. Also allways 
only one mediator will trace in onRegister().

Original issue reported on code.google.com by broadysm...@gmail.com on 8 Mar 2011 at 4:49

Attachments:

GoogleCodeExporter commented 9 years ago
Everything is ok. You cannot have two mediators in facade with the same name. 
Instead of passing NAME toashMediator.super() try to use id of viewComponent 
for example. When trying to register mediator which name is already used 
nothing happens ofcourse ( onRegister() is not called ).

Original comment by rafael.s...@gmail.com on 8 Mar 2011 at 4:55

GoogleCodeExporter commented 9 years ago
Oh my God... Tried to add Math.random() to the name, but now I see it... The 
NAME is static! I'm sorry, I'm new to all this stuff, good to see it didn't 
take a lot of time to You.

And it's 2:1 for You :D

Original comment by broadysm...@gmail.com on 8 Mar 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Fixed.

Original comment by PiotrZarzycki21@gmail.com on 23 Oct 2013 at 4:51