I have a cairngorm 2 app that uses multiple delegates to call
different methods of a single web service. The problem is, each
delegate adds it's own "onResult" and "onFault" events, so that when
the web service operation is called, *ALL* of the onResult functions
are called instead of just the one associated with the calling
delegate.
For example, one delegate has the following code:
this.service = ServiceLocator.getInstance().getService
("sym_security_standard") as WebService;
service.addEventListener(ResultEvent.RESULT,
sym_security_sp_login_search_onResult);
service.addEventListener(FaultEvent.FAULT,
sym_security_sp_login_search_onFault);
Another delegate has the following (similar) code:
this.service = ServiceLocator.getInstance().getService
("sym_security_standard") as WebService;
service.addEventListener(ResultEvent.RESULT,
sym_security_sp_group_search_onResult);
service.addEventListener(FaultEvent.FAULT,
sym_security_sp_group_search_onFault);
Since there's only one instance of the ServiceLocator, each delegate
is registering onResult / onFault events to the *same* object
instance, and therefore the onResult event triggers the onResult
function of multiple delegates instead of the single/target delegate.
Any ideas on how to avoid this?
Thanks in advance!
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/