Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

flex DataGrid±à¼­µ¥Ôª¸ñ²¢»ñȡеÄÖµ

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Panel width="458" height="313" layout="absolute">
<mx:Label id="lbl" x="19" y="10" text="" width="171" height="20"/>
<mx:DataGrid id="dg" x="19" y="58" dataProvider="{arr}" editable="true" itemEditEnd="editHandle(event)"
horizontalGridLines="true" horizontalGridLineColor="#B9F2C9" verticalGridLineColor="#B9F2C9">
<mx:columns>
<mx:DataGridColumn headerText="year" dataField="year" editable="false"/>
<mx:DataGridColumn headerText="city" dataField="city" editable="false"/>
<mx:DataGridColumn headerText="provice" dataField="provice" editable="false" sortable="false"/>
<mx:DataGridColumn headerText="total" dataField="total"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
<mx:Script>
<!--[CDATA[
import mx.controls.dataGridClasses.DataGridColumn;
import mx.events.DataGridEvent;
import mx.controls.Alert;
import mx.collections.ArrayCollection;
[Bindable]
private var arr:ArrayCollection=new ArrayCollection([
{year:2009,city:"Shanghai",provice:"ÉϺ£",total:580000},
{year:2009,city:"Beijing",provice:"ºÓ±±Ê¡",total:7852020},
{year:2009,city:"Nanjing",provice:"½­ËÕÊ¡",total:895145},
{year:2009,city:"Hangzhou",provice:"Õã½­Ê¡",total:4132415}]);
private function editHandle(event:DataGridEvent):void{
if(event.dataField=="total"){
var cols:DataGridColumn=dg.columns[event.columnIndex];
///±à¼­Ç°µÄÖµ,ûÓõ½£¬Ö»ÊÇÏë»ñµÃÒ»ÏÂ
var s:String=event.itemRenderer.data.total;
//±à¼­ºóеÄÖµ
var newValue:String=dg.itemEditorInstance[cols.editorDataField];
var num:Number=Number(tt);
if(isNaN(num)){
event.preventDefault();//»Ö¸´±¾À´Êý¾Ý
lbl.text="this is not num!";
}else{
lbl.text=tt;
/*=======²Ù×÷Êý¾ÝºÍÊý¾Ý¿â´ò½»µÀ=========*/
/*Ê¡ÂÔ*/
}
}

}


Ïà¹ØÎĵµ£º

FLEXʵ¼ù—¶¯Ì¬Çл»Ó¦ÓÃÆ¤·ô

     ÔÚͬһ¸öApplicationÖж¯Ì¬Çл»Ö÷Ì⣬ÕâÀï²ÉÓõÄÊǶ¯Ì¬ÒýÓò»Í¬µÄCSSÎļþ¡£
      ¾ßÌå²½ÖèÈçÏ£º
     1£©´´½¨CSSÎļþ
      skyTheme.css
      /* CSS file */
.backgroudSkin
{
&nbs ......

Flex TypeError: Error #1034: ÀàÐÍת»»Ê§°Ü

TypeError: Error #1034: 強ÖÆÐÍ変換¤Ëʧ敗¤·¤Þ¤·¤¿¡£jp.co.nec.necst.pi.ap2web::TestEvent@1645ee79 ¤ò jp.co.nec.necst.pi.ap2web.TestEvent ¤Ë変換¤Ç¤­¤Þ¤»¤ó¡£
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispat ......

flex traceÎÞ·¨Ê¹ÓÃ


½â¾öʹÓÃFlex  ÎÞ·¨Ê¹ÓÃtraceµÄÎÊÌâ
³öÏÖÁËʹÓÃDebug¹¦ÄܳöÏÖÁËÎÞ·¨Ê¹ÓÃtraceµÄÎÊÌâ
Õâ¸öÎÊÌâ˵Ã÷ÄãµÄFlash Player 10 ²»Êǵ÷ÊÔ°æ±¾
ÌṩһÏÂAdobe Flas Player 10µ÷ÊÔ°æ±¾µÄµØÖ·....
Ï£ÍûÄܶԴó¼ÒÓаïÖú
http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_ax_debug.exe
......

×ªÔØÊ¹ÓÃPyAmfÀ´ÊµÏÖFlexÓëDjangoµÄͨÐÅ

ÈýÄêǰ£¬ÓùýAmfPHPÓëFlash/Flex
Remoting×ö¹ý½»»¥£¬×î½ü½Ó´¥Python£¬¹«Ë¾ÏîÄ¿ÓõÄFlex×öǰ¶Ë£¬ËùÒÔ½Ó´¥ÁËPyAmf¡£PyAmf±¾ÖÊÉϸúAmfPHPÊÇÀ×ͬµÄ¡£¶¼ÊÇͨ
¹ý¶ÔAMFЭÒ飨ActionScript Message Format£©Ð­ÒéµÄÖ§³ÖÀ´ÊµÏÖ¶ÔFlashµÄ½»»¥¹ý³Ì¡£
Ò»¡¢Ê×ÏÈ£¬¼òµ¥µÄ½éÉÜÒ»ÏÂAMFЭÒé¸ñʽ¡£
AMFÊÇAdobe¶À¼Ò¿ª·¢³öÀ´µÄͨÐÅЭÒ飬Ëü²É ......

Flex£ºÓÃopenItemsÊôÐÔ½øÐÐTree¿Ø¼þµÄÕ¹¿ªÓë¹Ø±Õ

<?xml version="1.0" encoding="utf-8"?>
<!-- http://yecon.blog.hexun.com/28902341_d.html -->
<!-- http://www.slsay.com -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
     &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ