![]() |
Flex 4:Retrieving the action from the ResultEvent in an event handler
I have been using Flex(Flash) Builder 4 now for a little while. It used to be that, when importing web services, fault and result event types were created for each web service in the suite of services supplied by the provider.
In Flex 4, however, these events are not created and you use the generic ResultEvent and FaultEvent. I can see how this may be more efficient but this can lead to a problem. Code:
private var __mywstest:ProviderServices = new __mywstest:ProviderServices();The only way I have figured out how to do this is to write the following function. You pass it the resultEvent and it returns a string containing the name of the call that triggered this handler. Code:
private function getActionFromResultEvent(_e:ResultEvent):String |
did you ever get an answer to that? there MUST be a batter way, surely...?
|
| All times are GMT +1. The time now is 09:51 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.