Closed aliokan closed 7 years ago
<service id="myService" type="mock.MockService" /> <module id="module2" type="mock.MockModule"> <listen ref="myService"> <event static-ref="mock.MockMessage.EVENT" method="onUpdate"/> </listen> </module>
JS output :
myService.addHandler(mock_MockMessage.EVENT,$bind(module2,module2.onUpdate));
But if I add map-type on myService, addHandler is done on ApplicationDomainDispatcher and not on myService
<service id="myService" type="mock.MockService" map-type="mock.IMockService"/> <module id="module2" type="mock.MockModule"> <listen ref="myService"> <event static-ref="mock.MockMessage.EVENT" method="onUpdate"/> </listen> </module>
hex_domain_ApplicationDomainDispatcher.getInstance().addHandler(mock_MockMessage.EVENT,module2,$bind(module2,module2.onUpdate),__domainName_myService);
1° module2.onUpdate receive event
JS output :
2° module2.onUpdate never receive event
But if I add map-type on myService, addHandler is done on ApplicationDomainDispatcher and not on myService
JS output :