`
darrenzhu
  • 浏览: 782410 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Flex可变参数带来的问题

阅读更多
当你在flex的方法中用了可变参数后,你会发现这些参数传到java端后出现意想不到的情况,即flex会自动把你的实际参数封装到一个Array里面去,这样就会导致问题,如flex/java端取不到参数的值

override public function call(methodName:String, ... parameters):IOperation {
Assert.state(remoteObject != null, "The remoteObject property must not be null");
return new RemoteObjectOperation(remoteObject, methodName, parameters);
}
Here what need you attention is that the parameters will automatically encapsulate into an array, like your passed parameter is an object, it will go this way: [object], if you passed an array:[1,2,3], it will go this way:[[1,2,3]], so it may result in blazeds not finding the right java side method because of the parameter type changing.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics