• Home
  • About Me
  • AIR Central
  • AS3 Libs
  • Books
  • Flex Central
  • Resources
  • The Guru's
  •  

    flexlib

    February 28th, 2007

    flexlib_logo.jpg

    Another excellent new component resource has been added to Resources section of this blog.

    The FlexLib project is a community effort to create open source user interface components for Adobe Flex 2.

    Current components: ConvertibleTreeList, Draggable Slider, PromptingTextInput, Scrollable Menu Controls, SuperTabNavigator, Alternative Scrolling Canvases, Horizontal Accordion


    flexbox

    February 27th, 2007

    FlexBox is a directory of components scattered around the Internet in blogs, discussion lists and various websites.  If you have yet to visit flexbox, I suggest you do so and bookmark it.  I have added it to the Resources page within this blog as well.  Thanks to Mrinal Wadhwa for putting together such a great resource.


    ComboBox Bug

    February 26th, 2007

    So here is the situation, you want to display data in a ComboBox and make sure the user chooses something from the dropdown.  You do not want the first thing showing to be real data as this could cause the user to leave it as is and also void your validation routine. So, you decide that you will all a blank as the first position by adding an empty value to the Array that is the dataProvider for the ComboBox like this:

    private var dataP1:Array = [”, ‘one’,'two’,'three’,'four’,'five’,’six’,’seven’,'eight’,'nine’,'ten’];

    Doing this exposes a bug within the ComboBox where the value will be replaced by a blank space on each repeat of the rowCount property.  The example below has the rowCount set to 3 which is why you see one, two and then a blank where three should be.  If you were to change the rowCount to , the blank would then show where the five and ten should have been.

    A workaround is to use an blank space instead of an empty string in the first position of the Array like this:

    private var dataP2:Array = [’ ‘,’one’,'two’,'three’,'four’,'five’,’six’,’seven’,'eight’,'nine’,'ten’];

    However, all of this mess can be avoided by simply using the prompt property to add the blank space at the top of the ComboBox.  It should also be noted that the blank space added by the prompty property actually sits at a selectedIndex of -1 while the workarouns above would have the blank space at a selectedIndex of 0.  This doesn’t effect then functionality of the ComboBoxbut should be taken into consideration when validating.

    comboboxbug.jpg

    Click here to run the application

    Click here to get source code

    Rich


    Handle Alert Events Sample

    February 23rd, 2007

    This is a very simple example on how to handle Alert events and provide context specific responses.

    AlertChain.gif

    Click here to run the application

    Click here to get source code

    Rich


    Vote Now for Yahoo Maps!!

    February 16th, 2007

    Please take 30 seconds and visit http://suggestions.yahoo.com/detail/?prop=ydn&fid=3208 to vote for Yahoo Maps API to suport Flex 2.  Those of us who use the Flash 8 version with LocalConnection know that it works ok but is a pain.