Flex:生成的 *WatcherSetupUtil 中出现错误?
如果在运行 Flex 3.5 构建时行星未正确对齐,生成的 .swf
会立即从 _MyAppWatercherSetupUtil
抛出空对象错误:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at _MyAppWatcherSetupUtil/setup() at MyApp/initialize()[/Users/wolever/my_app/MyApp.mxml:0] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2131] at mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3400] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3223] at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3069]
我能做些什么吗关于这个?
我尝试过调试它,但似乎 Flex 框架不遗余力地确保无法调试生成的代码......
If the planets are not correctly aligned when I run a Flex 3.5 build, the .swf
produced immidiatly throws a null-object error from the _MyAppWatercherSetupUtil
:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at _MyAppWatcherSetupUtil/setup() at MyApp/initialize()[/Users/wolever/my_app/MyApp.mxml:0] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2131] at mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3400] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3223] at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3069]
Is there anything I can do about this?
I've tried debugging it, but it seems like the Flex framework goes out of its way to make sure it's impossible to debug into the generated code…
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我刚刚将旧的 Flex 3 应用程序升级到 Flex 4.6 并遇到了同样的问题。对我有用的是一个干净的项目。到目前为止,一切都很好。
——基思
I just upgraded an old Flex 3 app to Flex 4.6 and had the same problem. What worked for me was a project clean. So far so good.
--Keith
我今天在 WatcherSetupUil/setup() TypeError: Error #1009: Cannot access a property or method of a null object reference 中遇到了困难。
对我来说,看起来与数据绑定有很强的联系。对我来说,如果您不遵守 Flex 要求的规则,就会发生这种情况。我在网上找到了一个资源,并上传到这里:“Flex 数据绑定陷阱:10 个常见的误用和错误。”更改后 - 在我的情况下,尤其是错误 6 - 使用错误的可绑定事件名称 - 取消了 WatcherSetupUtil。
也许这对你也有帮助:-)。
http://www.adobe.com/devnet/flex/articles/databinding_pitfalls.html
I was struggeling today with a WatcherSetupUil/setup() TypeError: Error #1009: Cannot access a property or method of a null object reference.
For me it looks there is a strong connection to databinding. For me it looks this happens if you do not take care of the rules that Flex asks for. I found a resource online I upload here: "Flex data binding pitfalls: 10 common misuses and mistakes." After changing - in my case especially error 6 - Using the wrong bindable event name - took the WatcherSetupUtil away.
Perhaps this is helpful for you too :-).
http://www.adobe.com/devnet/flex/articles/databinding_pitfalls.html
看看为 MyAppWatcherSetupUtil 类的“setup”方法生成的代码会很有趣
It would be interesting to have a glimpse at generated code for "setup" method for your MyAppWatcherSetupUtil class
只是一个想法 - 您是否尝试设置编译器标志 -keep?这样你就可以看看你的班级是什么样子了。
Just an idea - did you try to set the compiler flag -keep? Like this you may have a look how your class looks like.