开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜