ictvmt / mvp4g

Automatically exported from code.google.com/p/mvp4g
0 stars 0 forks source link

Can't use the same class to broadcast 2 different events #80

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you use the same class for the broadcast attribute of 2 different events:
@Event(..., broadcastTo=OneClass.class)
void event1();

@Event(..., broadcastTo=OneClass.class)
void event2();

the broadcast will work only for one of the event.

workaround: use a different class for each broadcast attribute

Original issue reported on code.google.com by plcoir...@gmail.com on 21 Apr 2011 at 12:26

GoogleCodeExporter commented 8 years ago
In Mvp4gConfiguration, the broadcastMap uses EventElement for the map value, 
whereas the other maps use List<EventElement> :
// line 61 Mvp4gConfiguration.java
Map<JClassType, EventElement> broadcastMap = new HashMap<JClassType, 
EventElement>();

When adding another EventElement to the broadcastMap for the same JClassType, 
it overwrites it in the map.

Should I provide a patch? 

Original comment by abenw...@gmail.com on 23 Apr 2011 at 5:02

GoogleCodeExporter commented 8 years ago
If you can provide a patch, that would be great. Thanks

Original comment by plcoir...@gmail.com on 23 Apr 2011 at 4:54

GoogleCodeExporter commented 8 years ago
Fixed in the last snapshot

Original comment by plcoir...@gmail.com on 12 Jun 2011 at 6:26