How to add parameters in Alert Event Listener in Flex [duplicate]
I know I can create a custom event and associate data with it and retrieve it in respective Event Listener. But What I am interested to know is, is there a short method (without having to extend Alert Event Class) to associate parameters to its alert Listener.
I answered a (very) similar question here. I hope this helps!
For anyone else looking into this, I added a quick code example here.
Not really.
You could use global variables of some sort and just reference those variables. Depending on your architecture this could be trivial, or no issue. In most cases this will break encapsulation, though and it generally not the preferred approach.
精彩评论