flex小错误(常记多做)
1、假如一个自定义控件被用在一个主控件里,在自定义控件里的方法可以转换为主控件的方法,完成调用。
userRulesCanvas.mxml 和 editRulesCanvas.mxml
compent控件代码如下:
private function submitClick():void
{
if((code.length == 0)||(addr.length == 0))
{ //这里可调用主程序的方法editSipAccountHandle()
parentApplication.editSipAccountHandle(code.text,addr.text)
closeHandle()
}
}
主控件代码如下:
public function editSipAccountHandle(sipAccount:String)
{
getUserRuleWs.modifyRulePhone(sipAccount);
}
2、xml格式的string对象的读取
event.result的值等于如下
<?xml version="1.0" encoding="UTF-8"?>
<rule>
<sipAccount>sip:hill@ocp.gz.com</sipAccount>
<extension>sip:8190@ext.protel.com.hk</extension>
<action>
<outgoing>
<sipPhoneAddr code="408">sip:969071526@ext.protel.com.hk</sipPhoneAddr>
<sipPhoneAddr code="404">sip:963306728@ext.protel.com.hk</sipPhoneAddr>
相关文档:
We're going to keep this post lean and mean, and get down to
business with 10 Tips that will keep your Flex applications fast, lean,
and responsive.
Rule # 1: Clean up after yourself
In general, it is good practice to maintain clean code. Not only
in the sense of having properly formatted and ......
测试文件代码如下:导入com.hillelcoren.components包
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:hc="com.hillelcoren.components.*"
xmlns:classes="com.hillelcoren.components.autoComplete.classes.*"
xmlns:l ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
viewSourceURL="srcview/index.html" backgroundColor="0x000000" layout="absolute">
<mx:Script>
&nb ......
Flex中如何通过strokeWidth, strokeColor和shadowColor样式,创建一个自定义风格的HRule或VRule
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
&nbs ......
在Flex里,一般的弹出窗口(除了Alert以外)都可以用TitleWindow组件完成,主窗口和TitleWindow的数据传输可以用以下方法
假设TitleWindow的实例文件为titleWin.mxml,则要在Application中用PopUpManager创建一个titleWin的引用
private var popWin:titleWin = titleWin(PopUpManager.createPopUp(this,titleWin,true) ......