FLEX ERROR WARNING 总结
常会碰到的错误:TypeError: Error #1009: 无法访问空对象引用的属性或方法。:
http://hillelcoren.com/2008/09/19/flex-error-1009-cannot-access-a-property-or-method-of-a-null-object-reference/
Flex 2 Runtime Error 1009 and Runtime Modules:
http://life.neophi.com/danielr/2006/07/flex_2_runtime_error_1009_and.html
我碰到的Error #1009:
在一个弹出页面的TitleWindow的写了initialize="initComboBox();":
改为 creationComplete="initComboBox();" ,不再报错。
本次问题表明:了解mxml文件的初始化顺序是至关重要的!不要在initialize中访问本页面的组件,因为这样可能会出现不可预知的错误!
关于Flex Application 初始化顺序:
http://wuaner.iteye.com/blog/1054116
Warning:
原因:vo chuter未声明为绑定对象。未声明为Bindable。
解决办法:将FidsDepfChuterVo声明为[Bindable]即可:警告原因:domint是个ComboBox,其dataProvider是放有Object的ArrayCollection。因为Object不是EventDispatcher,所以当Object的属性change的时候,就无法dispatch "propertyChange"这个事件
Flex Error : class is not an IEventDispatcher:
http://blog.flexuous.com/2006/10/25/flex-error-class-is-not-an-ieventdispatcher/
Flex Warning: Unable to bind to property ‘XXX’ on class ‘XXX’:
http://www.thedesilva.com/2009/02/flex-warning-unable-to-bind-to-property-%E2%80%98xxx%E2%80%99-on-class-%E2%80%98xxx%E2%80%99/
对于一个单个的对象Object,想解决这个问题,使用代理对象 ObjectProxy 来代理原对象是比较好的解决办法:[b][size=small]但我现在遇到的问题是:通过remoteObject调用java后台(后台java方法的返回类型为List<ComboBoxEntity>)返回的ArrayCollection中的对象为Object类型。那怎么办那?还是用ObjectProxy,通过遍历远程返回的list逐个代理里头的对象是未尝不可的:flash.net.registerClassAlias("JAVA端的类全名",AS类名);
Why does adding Bindable to a Getter and Setter Method cause a compiler warning?
http://www.jeffryhouser.com/index.cfm/2008/12/16/Why-does-adding-Bindable-to-a-Getter-and-Setter-Method-cause-a-compiler-warning