Flex xml-rpc的使用(四)

 

  42:         <mx:VBox label="Methods with Parameters" width="100%" height="100%">

  43:            

  44:             <!--What Blog-->

  45:             <mx:Label

  46:                 text="What Blog"

  47:                 fontWeight="bold"/>

  48:                 <mx:NumericStepper id="txt_blogid"

  49:                     maximum="5"

  50:                     minimum="1"/>

  51:                

  52:             <!--How Many-->   

  53:             <mx:Label

  54:                 text="How Many"

  55:                 fontWeight="bold"/>

  56:                 <mx:NumericStepper id="txt_count"

  57:                     maximum="25"

  58:                     minimum="5"/>

  59:            

  60:             <!--GetRecentPosts-->

  61:             <mx:Button

  62:                 click="getRecentPosts()"

  63:                 label="Get Recent Posts"

  64:                 width="100%"/>                   

  65:        

  66:         </mx:VBox>

  67:     </mx:Accordion>                           

  68:                

  69:     <!--Sandbox Results-->

  70:     <mx:DataGrid id="dg_returneddata"

  71:         height="100%"

  72:         width="100%"

  73:         dataProvider="{ returnedData }"/>

  74: </mx:HDividedBox>

 

 

当你在用FLEX3的时候需要注意一个问题.由于xml-rpc库现在已经停止更新了.它与FLEX3存在一个兼容问题,在FLEX3使用

xml-rpc时,会提示XMLRPCObject.as文件下的setCredentials与setRemoteCredentials无法重写.

解决办法如下:

找到setCredentials所在行与setRemoteCredentials所在行,用以下代码替换:

1.override public function setCredentials (username:String,password:String,charset:String = null):void

2.override public function setRemoteCredentials (username:String,password:String,charset:String = null):void

 

 

你可能感兴趣的:(xml,Flex,Blog)