[Mails] $.25 to $0.25

To formnat a long from “.xx” to “0.xx”, this formatter method can be used.

function format2 ( str ):String{
var currencyFormattedString = str;
var a = currencyFormattedString.split(".");
currencyFormattedString = currencyFormattedString[0] + "0." +currencyFormattedString[1];
my_lbl.text = format2 ( "$.25" );

Courtesy: JesterXL

[Mails] Hot Keys

We have a requirement wherein the users need to have the ability to have hotkeys /shortcuts to perform certain operations, like (triggering a particular link, submiting a form ).Does Flex platform have a built macro / shortcut support to do something like this?


There’s no built-in support in the framework as of now. It’s been on the “nice to have” features list, but somehow didn’t make it in this release. Now, this is something you could build on your own easily though. You’d have to listen for the key events on the “system manager” object in the “capture” phase.

systemManager.addEventListener("keyUp", globalKeyUp, true /* capture */ );

You can allow the developer to then map specific keys to specific event handlers.

And so on.