FlexµÄTabNavigatorÖÐtab´¥·¢µÄʼþ
Getting Around Bug in Adobe Flex: TabControl Inline Event Handling for TabIndexChange Doesn't Work
I ran into this because I wanted to do something funky. I wanted my Flex app window to change PageStates (and size) whenever the TabIndex changed. Whether doing this kind of thing is wise in a user interface is yet to be seen -- I did it and it even strikes ME as a bit off the wall -- but it did solve the immediate issue. The immediate issue was that some of my tabs required a lot of space and some did not. This left a lot of ugly whitespace.
So, I figured, Flex (Actually Flash under the covers) must have an event handler for changing tabs. And I was rewarded very quickly: There is a "TabIndexChange" inline event handler. For the uninitiated, such a thing looks something like this:
<mx:TabNavigator id="tabnavigator1" tabIndexChange="myHandlerFunction()">
With most other events, this works just fine: When the event fires, the handler is called. But it simply doesn't work in this case. The handler function is never called.
There's a couple of ways to handle this. One way is to use a TabBar control rather than a TabControl. The TabBar basically gives you the look and feel of a tabset but more control over what is tabbed. And the tabIndexChange even calls the handler as one might expect.
I didn't want to do it that way, however. For one thing, I'm stubborn. For another, I already had all my controls arranged on the TabNavigator and I didn't want to rip it half to pieces to get functionality that I should already be getting.
Fortunately, there's a solution: Explicitly declare an event listener. That looks something like this:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="InitApp()">
<mx:Script>
<![CDATA[
import mx.events.IndexChangedE
Ïà¹ØÎĵµ£º
Èç¹ûÄãÊǵçÐÅÐÐÒµµÄ³ÌÐòÔ±£¬´óÃû¶¦¶¦µÄÍØÆËͼ¹¤¾ßTWaverÄãÒ»¶¨¶úÊìÄÜÏꣻµ«ÊÇÈç¹ûÒ»Ìáµ½TWaverÄã¾ÍÏëµ½Ò»¸öSwing×é¼þ°ü£¬ÄÇÄãºÁÎÞÒÉÎÊÒѾoutÁË¡£¾¹ýÊ®¼¸ÄêµÄ·¢Õ¹£¬TWaver¿´ÉÏÈ¥ÒѾ²»ÔÙÊÇÒ»¸ö¼òµ¥µÄSwingÍØÆË×é¼þ£¬ÕâЩÄêTWaver½ÐøÍƳöÁËAJAX+SVGµÄWeb°æ¡¢GIS°æ£¬ÏÖÔÚÓÖ³öÁËFlex°æ¡£Ê²Ã´£¿Flex°æTWaver£¿Ð¡Íæ¾ß°É£¿ÄÜ×öÆ ......
¶Ôarcgis server for flexѧϰÁËÒ»¶Îʱ¼äÁË£¬ÐèÒª¶Ô×Ô¼ºµÄѧϰ¹ý³Ì×ܽáһϣº
×¼±¸¹¤×÷£º1Ò»°ã¶Ôarcgis serverÈí¼þµÄ°²×°ÐèҪȷ±£×Ô¼ºµÄµçÄÔÉÏ°²×°ÁËIIS·þÎñÆ÷£»
2£¬È·±£Ò»Ð©arcgis server±¾Éí»áÕ¼ÓÃ80¶Ë¿Ú£¬Èç¹ûÄãµÄµçÄÔÉÏÒѾװÁËѸÀ×Èí¼þµÄ»°£¬ÐèÒªÐÞ¸ÄѸÀ×ËùÕ¼ÓõÄ80¶Ë¿Ú¡£3×îºóÄãµÄµçÄÔÉÏ×°ÓÐarcgis desktop£¬Ò»±éÊý ......
FlexÖеÄǶÈë×ÊÔ´£¨Embedding Assets£©——SwingguyÕªÒë×ÔFlex 3 Developer's Guide£¬×ªÔØÇë×¢Ã÷2007-10-27 17:18 FlexÈí¼þÖо³£ÐèҪʹÓÃһЩÍⲿµÄ×ÊÔ´£¬ÈçͼƬ¡¢ÉùÒô¡¢SWF»ò×ÖÌ壬ËäÈ»ÄãÒ²¿ÉÒÔÔÚÈí¼þÔËÐеÄʱºòÒýÈëºÍÔØÈ룬µ«ÊÇÒ²¿ÉÄܾ³£ÐèÒªÖ±½Ó½«ÕâЩ×ÊÔ´ ......
Flex 4 DropDownList:
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Spark DropDownList control -->
<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/ ......
1ÔÂ17ÈÕ
Flex¿ªÔ´¿ò¼Ü»ã×Ü
Cairngorm (download)
CairngormÊÇÒ»¸ö×îÔç×îΪ³ÉÊìµÄFLEX¿ò¼Ü,ÏÖÔÚÒѹéΪADOBEÃÅÏÂ.
PureMVC (download)
ËüÆäʵÊÇÒ»¸öActionScript 3¿ò¼Ü,²»ÏñCairngorm,Ëü²¢²»ÊÇÕë¶ÔFLASH,FLEX»òÕßÆäËüADOBE AS3.0Àà¡£ËüÊÇÒ»¸öÓÃÓÚ¿ª·¢»ùÓÚFLASHµÄAS 3.0µÄÈκγÌÐò.
Model-Glue: Flex (download)
Model- ......