<local:Finance id="finance" fid="{finance.fid}" month="{month.text}" income="{Number(income.text)}" overhead="{Number(overhead.text)}"/>
<mx:RemoteObject id="f" destination="service" result="resultShow(event)" fault="faultShow(event)">
</mx:RemoteObject>
<mx:Canvas width="100%" height="100%">
<mx:Form x="68.5" y="33" height="160">
<mx:FormItem label="编号">
<mx:TextInput id="fid" text="{finance.fid}" editable="false"/>
</mx:FormItem>
<mx:FormItem label="月份">
<mx:TextInput id="month" text="{finance.month}"/>
</mx:FormItem>
<mx:FormItem label="收入">
<mx:TextInput id="income" text="{finance.income}"/>
</mx:FormItem>
<mx:FormItem label="支出">
<mx:TextInput id="overhead" text="{finance.overhead}"/>
</mx:FormItem>
</mx:Form>
<mx:ControlBar x="229.5" y="181">
<mx:Button label="更新" click="f.update(finance)"/>
</mx:ControlBar>
</mx:Canvas>
[b]说明:local:Finance 是个model对象。 其中income和overhead 是其中的两个Nubner类型的属性。
income.text 从TextInput标签中获得的是String类型。
将string类型转换成Number类型
Number(income.text)}
var s:Number = "3" as Number
[/b]