Archive for the ‘Flex/Air/ActionScript’ Category
I am back to real world and my blog
After a year of inactivity I am back to my blog. Last couple of months I was really busy while working on our company product for a digital signage – AMS. It was a great time with Linux, Erlang/OTP and Adobe Flex/AIR (well not so much fun with AS3 to be honest
). We were presenting our solution on ISEurope at Amsterdam and it was very promising. So now I will have some more time to my real life, WP and maybe even blogging…
Adobe Flex Builder on Ubuntu Jaunty Jackalope
Adobe Flex Builder was one of tools, that I wanted to run native after my switch to Ubuntu desktop. Adobe released alfa version of Flex builder build on top of Eclipse IDE. Because my workstation is amd64, it is not so easy to install as on x86 architecture.
Adobe Eclipse Flex Linux AIR issues with entering Czech characters into text control
While I was working on Flex application that was integrated as desktop application using Adobe AIR, I face this very strange issue. While I was entering text into TextField, all previously entered text disappears after pressing Shift+4/č! It was really frustrating bug not only from user experience point of view
. So how to fix it if it is out of your control? Simplest way is to wait for a fix from Adobe, but I was not my case. I wrote a small workaround. It is not ideal, because all these workarounds are for certain cost. I created a small method for filtering wrong inputs and correct them. Yes, it is not so nice, but it saved my project timeline
.
public static function fixTextInput(event:KeyboardEvent) : void { if ((event.charCode == 13) && (event.keyCode == 52)) { event.preventDefault(); var control:TextInput = TextInput(event.currentTarget); if (event.shiftKey) { control.text = control.text.substring(0,control.selectionBeginIndex) + "4" + control.text.substring(control.selectionBeginIndex,control.text.length); } else { control.text = control.text.substring(0,control.selectionBeginIndex) + "č" + control.text.substring(control.selectionBeginIndex,control.text.length); } control.setSelection(control.selectionBeginIndex + 1, control.selectionBeginIndex + 1); } } |
ActionScript AIR Flex workaround






