首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > vofactory

vofactory

  • 资源大小:427.29 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签:

资 源 简 介

Have you ever wanted to take an XML or generic Object and use it in your application as a typed ActionScript object? If so, the typical approach requires the developer to create custom factories in your BDs (Business Delegate, assuming you’re using Cairngorm) or directly in the BD or in each Command (I hope not) for each property within the response XML -- the following example assumes you"re a Responder object"s result method: ``` function result(response:Object):void { var responseXML:XML; var myResponse:MyResponse; item:XMLList; responseXML = XML(response); myResponse = new MyResponse(); myResponse.objFoo = String(responseXML.@objFoo); // for XML attrs myResponse.objBar = Number(responseXML.objBar); // for XML nodes // for XML nodes that you need a Boolean from myResponse.objBarA = (responseXML.objBarA == "true") ? true : false; // looping through a list of nodes and create an array or for each(item in myResponse.items) { myRespon

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP