Bugs fixed
---------
[!] Fixed issue when open popup windows was not automatically closed when MouseEvent.MOUSE_WHEEL occurred somewhere outside of the component;
[!] Fixed issue "Error when hit Enter in InputAssist with no dataProvider" https://github.com/JabbyPanda/InputAssist/issues/2.
And the last, but not the least - InputAssist is now ready to be used in projects compiled against Flex 4.5 SDK - I just did some code trick due to the public API change in MatrixUtil.getConcatenatedMatrix method in Flex 4.5.
As always, the most recent source code of the component and compiled SWC library file is available at github.com/JabbyPanda/InputAssist
My hands are scratching today to show you a preview of MaskedTextInput control for Flex 4 SDK that I've been working on.
Currently only date mask in format "DD/MM/YY" is supported, but more to come.
The last, but not the least announcement for today - I plan to create MaskedTextInput control that will be independent of Flex SDK too for all Flash platform developers to benefit from!
As we all know, a current Flex 4 SDK does not include a new Spark DateField control. And an older 'halo' DateField component is left abandoned somewhere in 2008 year. This leaves the users of Flex SDK with simply no choice available out of the box to support the entry of formatted date data entry in standard international date formats.
Thus, today I am releasing my open-sourced component DateField4 that fixes a number of bugs and issues related to international dates and inline date editing.
I've named my component DateField4, to emphasize the fact that this component is only meant to be used with Flex 4 SDK and beyond.
Below is the demo that showcases the difference between DateField4 and 'halo' DateField.
For example, you may notice, that 'halo' DateField does not support neither French nor Italian international date formatting even to display the date, oouch.
This demo was compiled using newest build of Flex 4.5 SDK to showcase a new Spark Form (good news - we are no longer limited to display validation errors in single tooltip).
The complete list of new features and bug-list fixes:
[*] Always enabled much improved custom validator for editable DateField that fully supports i18n dates;
[*] Limiting the data entry to "allowedFormatChars" value + numeric chars for editable DateField;
[*] Added "autoShowDropDown" property that controls when dropDown DateChooser menu is displayed;
[*] Pressing ESCAPE key resets the date selection to the previous value before DateField control had obtained a focus;
[*] Improved keyboard navigation for dropDown DateChooser menu when DateField is editable: RIGHT, LEFT, UP, DOWN, PAGE_UP, PAGE_DOWN key strokes are supported;
[!] Fixed SDK-23069 [Localization]: DateFormatter.parseDateString does not support non-latin characters in month and days names;
[!] Fixed SDK-23075 "[Localization]: DateField should support "MMM" and "MMMM" for formatString";
[!] Fixed SDK-26715 "DateFormatter "parseDateString" method cannot parse dateString value formatted with non default en_US format";
[!] Default width of DateField is wider by 4px to correctly display selected Date when moving cursor caret to the end of the text.
New Flex Spark Label to display text uses the new Flash Text Engine (FTE) introduced in Flash Player 10. And that's true, FTE brought many very useful new features (text subscript, bidirectional text to name a few) that were previously impossible to achieve with older flash.text.TextField object, but I've learned recently that FTE can fail to display Thai characters under Windows XP clean install.
Eric Y Muller explains the technical details at Adobe forums:, why FTE cannot use neither Tahoma nor Microsoft Sans Serif standard Windows XP fonts as device fallback to display Thai characters.
The only workaround for this issue for the frustrated user would be to insert original CD with Windows XP install and install Thai language support using "Regional and Language Options" control panel. But this would impossible to achieve for the anonymous employee that works for trans-global corporation without admin access account %-)
As for the developer of the Flash application we can always embed font into Flash app that contains Thai characters, but this will impact the overall bytesize of the resulting SWF file.
ps
In 2010, Windows XP remains highly relevant OS. Various stat counters show that 52% - 64% computer users use Windows XP. Thus it is very important for any Flash application to play nice under this OS without an hassle.
Updated: More recent version of this component was announced at September.
Disclaimer: My implementation of AutoComplete component is based on the revised codebase of AutoComplete 4 component originally created by Tenger Ivan from FlashCommander.org
Two different search modes are supported : PREFIX and INFIX, to see the difference please play with the interactive sample file below.
The auto-completion operation can be achieved in two ways:
via keyboard
First, select the list item by moving selected index via UP and DOWN keys and confirm the choice by hitting ENTER key
via mouse
Just mouse click upon the currently selected list item.
Disclaimer: the source code of this component is of beta quality and can be obtained for free here: ZIP file, 23 kb. If any bug is found, please let me know.
UPD: Updated sample file with a real world list of 978 US universities.
Also a few bugs were fixed related to case insensitive search and not working text highlight of the last string character.
My use-case
Recently I've tried to introduce skin states to the pretty complex UI component in Adobe Flex 4. I have got puzzled by the behaviour that my invalidateSkinState() calls never had triggered execution of getCurrentSkinState method that controlls the current UI component skin state value as expected.
Invalidation of the same phase while processing that phase is ignored - by Alex Harui
Under closer examination I found out that I fall into the same invalidation trap that James Polanco did in November 2010.
I must stress out that it was easy to fall into this trap in my case because inside "commitProperties" call I was doing pretty complex calculations that involved, for example, the creation of display object sub-children, listening for "preinitialize" events from those sub-children, reacting to it, etc.
To cut the talk short, to prevent this property invalidation trap from happening I suggest to always follow the simple rule of the thumb:
When overriding "commitProperties" put "super.commitProperties" call to the end of the method
override protected function commitProperties():void{if(myPropertyChanged){
disableMyUIComponent = true;
invalidateSkinState();
myPropertyChanged = false;
}super.commitProperties();
}
override protected function getCurrentSkinState():String{var returnState:String = "normal";
// Use information in the class to determine the new view state of the skin class. if(disableMyUIComponent){
returnState = "disabled";
}return returnState;
}