Flex Êý¾ÝÒ×·¸´íÎó: ³£¼ûÎóÓúʹíÎó
¶ªÊ§¾²Ä¬´íÎó£¨SILENT ERROR£©
ÔÚijЩÇéÐÎÏ£¬°ó¶¨²Ù×÷Ëƺõ²»ÄÜÕý³£¹¤×÷£¬´ËʱÄã¿ÉÄܷdz£°ÃÄÕ²¢ÇÒ²»ÖªµÀÈçºÎ½øÐд¦Àí¡£
Óɰ󶨱í´ïʽÅ׳öµÄ¡¢»òÔڰ󶨿ò¼Üµ÷Óõİ󶨺¯ÊýÖгöÏÖµÄÒì³£ºÍ´íÎó¿ÉÒÔ±»¾²Ä¬²¶»ñ¡£Òò´Ë£¬Ä㽫²»»á¿´µ½ÔËÐÐʱÒì³££¬¶øÕâÔÚ Flash Player µÄµ÷ÊÔ°æ±¾ÖÐÊÇÄܹ»¿´µ½µÄ¡£Õâʱ£¬²»½ö°ó¶¨²Ù×÷²»Äܹ¤×÷£¬¶øÇÒϵͳ²»»áÏÔʾ´íÎó¡£
Ϊʲô´íÎó±»¾²Ä¬²¶»ñ£¿
Ôڰ󶨲Ù×÷·¢Éú֮ǰ£¬ÊµÏְ󶨻úÖƵĴúÂëÒªÇóÂú×ãÈô¸ÉÌõ¼þ¡£°ó¶¨»úÖƽ«ÍÌûËùÓдíÎóÒÔ±ã×èÖ¹ÔÚÔËÐÐʱ¹ý³ÌÖÐÅ׳öÔËÐÐʱÒì³£¡£ÕâÊÇÒ»ÖֺܺõĻúÖÆ£¬ÒòΪÄ㲻ϣÍûÔÚÄãµÄÓ¦ÓóÌÐòÖп´µ½ÕâЩ£¨¿ÉÄܵģ©ÒâÍâ´íÎó¡£
Çë²é¿´ÏÂÃæ¼òµ¥°ó¶¨·¶Àý£º
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="1024" minHeight="768"
preinitialize="handlePreinitialize()">
<fx:Script>
<![CDATA[
[Bindable]
private var xml:XML =
<users>
<user>
<name>EladElrom</name>
<address>1 Wall Street</address>
</user>
</users>;
protected function handlePreinitialize():void
{
xml = null;
//BindingManager.debugBinding("label.text");
}
]]>
</fx:Script>
<s:Label id="label" text="{xml.user.name}"/>
</s:Application>
ÎÒÒѾÌí¼ÓÒ»¸öÓëLabel×é¼þ°ó¶¨µÄxml±äÁ¿¡£ÉÏÃæ´úÂë±¾¿ÉÒÔÖ§³ÖÖ´ÐС£È»¶ø£¬ÎÒÔÚ×é¼þµÄÔ¤³õʼ»¯ÆÚ¼äÒѾ½«¸Ãxml±äÁ¿ÉèÖÃΪnull¡£ÔÚ×é¼þ³õʼ»¯ÐòÁпªÊ¼Ê±ÏµÍ³»áÏ·¢¸Ãʼþ£¬ÕâÑù¸Ãxml¶ÔÏó½«Ã»ÓÐname ÊôÐÔ¡£Èç¹ûÄãÔËÐиÃÓ¦ÓóÌÐò£¬Ä㽫»á·¢Ïְ󶨲Ù×÷²»ÄÜÖ´Ðв¢ÇÒ´íÎ󽫱»ÏµÍ³¾²Ä¬²¶»ñ¡£
µ÷ÊÔ°ó¶¨
¾¡¹Üϵͳ¿ÉÒÔ¾²Ä¬µØ²¶»ñ´íÎ󣬵«ÄãÈÔÈ»¿ÉÒÔͨ¹ýijЩÊÖ¶ÎÁ˽âÓ¦ÓóÌÐòµÄÔËÐйý³Ì¡£ ÀûÓà BindingManager.as ºÍ Binding.as ´úÂë½øÐе÷ÊÔ²»ÊÇÇá¶øÒ×¾ÙµÄÊ£¬ÒòΪÄãÐèÒªÏÂÔØÕû
Ïà¹ØÎĵµ£º
¡¡¡¡×î½üÔÚ¿ª·¢¹ý³ÌÖз¢ÏÖÒ»¸öÎÊÌ⣺BooleanÀàÐ͵ÄÖµÎÞ·¨ÔÚflexºÍjava¼ä´«µÝ£¬¾¹ýÒ»¶ÎÑо¿·¢ÏÖ£¬ÎÊÌâ³öÏÖÔÚBooleanÀàÐ͵ÄgetterºÍsetter·½·¨ÉÏ¡£
°´ÕÕjavabeanµÄ¹æ·¶£¬Ð¡²¼¶ûÀàÐ͵ÄgetterÊÇÒÔis×öǰ׺µÄ£¬µ«ÊǴ󲼶ûÀàÐ͵Ägetter¾Í³ÉÁËÒÔgetΪǰ׺ÁË£¨´ó²¼¶û×÷ΪÒýÓÃÀàÐÍ£¬ÒѾ±»ÊÓΪÆÕͨ ......
֮ǰһֱûÔÚÒ⸸ÈÝÆ÷ºÍ×ÓÈÝÆ÷¸÷×ÔµÄÉú³É´ÎÐò£¬ÖªµÀÔÚÏîÄ¿ÖÐÓöµ½Ò»ÖÖcase:³õʼ»¯½çÃæʱ¸¸ÈÝÆ÷³õʼ»¯µÄÄÚÈÝÓÉ×ÓÈÝÆ÷Ïȳõʼ»¯ÔÙ´¥·¢£¬µ«ÊǸ¸ÈÝÆ÷±ØÐëÔÚ³õʼ»¯Ê±¾ÍÒѾ¼ÓÉÏÁ˶Ô×ÓÈÝÆ÷µÄ¼à¿Ø¡£Õâ¾ÍÔì³ÉÒ»¶Ôì¶Ü£¬¼ÈÏëÏÈÉú³É×ÓÈÝÆ÷ÓÖÏëÏÈÉú³É¸¸ÈÝÆ÷¡£
ÏÈ×Ô¼ºÐ´¶Î´úÂë²âÊÔÒ»ÏÂÉú³É˳Ðò£¬¸¸ÈÝÆ÷
<?xml version="1.0" ......
ÕâÁ½Ìì¿´Á˹«Ë¾ÀÏ×ÜÑÝʾµÄÒ»¸öЧ¹û£¬ÈÈͼ·Ö²¼Çé¿ö£¬¸Ð¾õºÜÖ±¹Û¡£¹úÄÚµØͼÉϺÜÉÙÓÐÕâÖÖ±íÏÖ·½Ê½µÄ¡£
gÁËһϷ¢ÏÖÒÔÏ£º·¢ÏÖflexÏÂÓÐ IBM ILOG Elixir ¿ÉÒÔÓ㬲»¹ýÕâÒª»¨Ç®¡£
https://www.adobe.com/cn/products/flex/ibmilogelixir/
»¹ÓÐÒ»¸öHeat API£¬¿ÉÒÔÔÙgooglemapÉϵþ¼ÓÈÈͼ¡£
http://www.heatmapapi.com/ £¬ ......
ÓÃFlex4¼ÓÔØFlex3µÄ×é¼þʱ£¬·¢ÏÖÁËÕâ¸öÎÊÌ⣺
µ±ÓÃsparkÌí¼ÓÒ»¸ömx×é¼þʱ²»»áÓÐÎÊÌ⣬µ«µ±Õâ¸ömx×é¼þÖл¹ÓÐÆäËû×é¼þ
ÀýÈç<mx:HBox><mx:Canvas/></mx:HBox>±»Ìí¼Óµ½<s:Group></s:Group>
(×¢£ºÍ¨¹ýAS´úÂëʹÓÃaddElement()Ìí¼Ó£¬¶ø²»ÊÇÖ±½Óдµ½mxmlÖÐ)
stage.frameRate»á˲¼ä´ïµ½1000£¡
Ö® ......
£¨Ò»£©ÈëÃÅ
Flex¼¯³ÉÒ»¸öLog¿ò¼Ü£¬¿ÉÒÔÍê³ÉºÜ¶àÓÃtrace()×ödebugʱÍê³É²»Á˵ŦÄÜ
Êä³ölogʱ¿ÉÒÔʵÏֵַȼ¶£¨¹²5+1¼¶£©£¬ÓùýÂËÆ÷Ö¸¶¨Êä³öµÄÀ࣬ÒÔ¼°Êä³ö·½Ê½£¨Ä¬ÈÏΪtrace£©
ÐèÒªÓõ½µÄÀà
¸ÃÀàλÓÚmx.logging°üÖУ¬
¹²ÐèÒªÈý¸öÀàºÍÒ»¸ö½Ó¿Ú
mx.logging.Log – Ö÷À࣬Óм¸¸ö¾²Ì¬·½·¨£¬Ìí¼Ó/ÒƳýTraceTargetºÍ»ñÈ ......