Adobe Flex

Fix for “backgroundColor” and “disabledBackroundColor” styles for Tree component from Flex 2.0.1 SDK

    Problem: Unoccupied space with tree items inside Tree component is always filled with black color if "depthColors" style is applied to Tree UI component from Flex 2.0.1. SDK.

   Fix: My ExtendedTree class fixes this error by reusing the old code from method implementation 'drawRowBackgrounds' in Tree.as from old Flex 2.0 SDK.

Example: http://jabbypanda.com/labs/treeDepthColors/treeDepthColors.html
Source files: http://jabbypanda.com/labs/treeDepthColors/srcview/index.html

Using a:hover pseudo CSS classes with Flex 2.0.1 SDK components

   I like using a:hover pseudo CSS class for styling hyperlinks in HTML and I would like to do the similar with hyperlinks inside text displayed with Flex 2.0.1 SDK UI components such as mx:TextArea and mx:Text.

   In Flex 2.0.1 SDK the support for a:hover pseudo CSS classes is done via runtime style sheets.

   <mx:TextArea> component starting from Flex 2.0.1 SDK supports setting CSS stylesheet at runtime right from the box.
   <mx:Text> is not that ready to accomplish the similar task, fortunately for us it is easy to extend <mx:Text> component and add the required functionality to it - see the code below.

 
package com.jabbypanda.controls {
    import mx.controls.Text;
    import flash.text.StyleSheet;
 
    public class ExtendedText extends Text {
 
        public function ExtendedText() {
            super();
        }
 
        public function get styleSheet() : StyleSheet {
             return textField.styleSheet;
        }
 
        public function set styleSheet(value : StyleSheet) : void {
            textField.styleSheet = value;
        }
    }
}

Example: http://jabbypanda.com/labs/hoverCSS/HoverCSSFlexSupport.html
Source files: http://jabbypanda.com/labs/hoverCSS/srcview/index.html

Acknowledgements:

    In my experiments I was both inspired by the quote from Flex 2 livedocs:'You can also define a:link, a:hover, and a:active styles for anchor tags by using style sheets' and by reading a great article followed by very useful comments published at FlashLit blog titled "Styling Flex TextArea content with CSS".

Flex 2.0.1 with runtime CSS support and modular approach for Flex apps is coming…

mx:HTTPService calls are cached in IE 6 unnecessary

Usually, mx:HTTPService is defined in MXML in the following way:

<mx:HTTPService id="accountsRequest"
      method="POST" url="accounts.php"
      result="assignUsersData(event)" fault="onErrorLoad(event)">
</mx:HTTPService

Such a HTTP request works flawlessly in Firefox browser, but in IE6 after first call the results of HTTP get cached and a new call to the remote destination never occur. The same issue is discussed at Adobe Flash Player 9 forums.My solution to prevent caching of HTTP requests in IE is to add foo variable to the url of HTTP Service that equals to the random value.

private function changePage(pageIdValue : Number) : void 
{
      var rnd : Number = Math.round(Math.random()*1000);
      accountsRequest.url = "accounts.php?foo=" + rnd;
      accountsRequest.send();
      pageId = pageIdValue; 
}

Macromedia will preserve its name forever in MXML abbreviation

I feel kinda blue, when I see more and more signs that Macromedia brand and Macromedia name will slowly dissappear from the Internet, and only historians and Internet WayBack machine will remember what Macromedia name standed for.

But today, I kinda feel happy again, because Macromedia FleX Markup Language (MXML for short) - a markup language for rich internet applications created by Macromedia back at 2003 and now intelectual property of Adobe will hold the the glory Macromedia name inside MXML abbreviation for ever, I guess.

I think it is very unlikely, that MXML will change its name to AXML (Adobe FleX Markup Language) some day.

John Dowdell, please, do not prove, that I am wrong in my statement!

Why Flex is more superior over open-sourced Laszlo? Here is my take

   While there is quite a number of technoolgies aiming to ease the life of modern RIA developer ( Droplets, Xamalon/XAML/Sparkle, Laszlo, JSF, XUI, XUL based stuff, SwixML, Thinlets, XSWT, Luxor, Keystone, Jazilla, Vexi, Ajax, etc... thanks for this list Tariq Ahmed from Flexcoders mailing list we the three contenders for the final choice as main technology to deliver RIA applicatiion at client.

   The conteders are: Flash, Flex and Laszlo. No surprise, here.

   We selected Macromedia Flex as our initial choice in summer 2005 and we do not yet regret about it.

   The selection creterea were: the exisitng developer base, the innovation development done with this technology, the solid widget library, AMF binary protocol support, final download size of SWF, final time of the development to name a few.

   I would like to hear more both from strong opponnnets of Flash and Laszlo technologies how those technologies can be superior over Macromedia Flex to deliver enterprise level RIA in web-browser.