How to monkey patch or override a swc class in Flex?

人盡茶涼 提交于 2019-12-02 07:41:29

I'm not sure if you are allowed to do the following: put the class with your fix in the source path of your main application. If you make sure the package and class names match exactly with the original class, the compiler will pick this class up instead of the one in the library. We do this often when we want to patch the Flex framework without having to compile the libraries ourselves.

Another idea might be to use AS3Commons-Bytecode to create a proxy of the class you want to fix and then have your code work on the proxy instead of the original instance. This is a pure runtime fix. It's a bit more advanced and it will only work if you can somehow get the proxy to replace the original instance of the class you need to fix.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!