AS3/Flex Decorator Pattern
I'm trying to create a decorator class in AS3/Flex in order to add some functionality to a UI element. The problem is that I don't 开发者_Python百科know how to automatically "redirect" method and property calls to the object being decorated. I suppose I'm looking for something like the __call() "magic method" from PHP, which is called every time the application calls a non-callable method.
So, the question is - how do I redirect calls for methods and properties (which aren't overriden/don't exist in the decorator class) to the object being decorated?
I think the closest to magic methods in actionscript would be extending Proxy.
精彩评论