Archive for February, 2009

Why I hate SVN

February 23rd, 2009 by Martin

One of the most  reasons why I really hate SVN is its approach to renaming files and generally its lack of support for common development activities like refactoring. It is unbelievely painful action. And every solid developer refactors as often as possible (you are one of them, don’t you?). But if you are using SVN you are lost in cycle Update-CleanUp-Commit and pray to a God for no troubles while committing. But to be positive at the end…. Yes just use GIT!!! :)

 Tags

WordPress plugin updates

February 20th, 2009 by Martin

After quite a long period I finally found some spare time for work on my WordPress plugins. I did some small fixes and moved Custom Logo and Plugin List into WordPress Plugin Directory. It is only a beginning. I am working on rest of my plugins and also one brand new plugin. As usually this new plugin idea came from everyday practise ;) .

Happy WordPressing :)

 Tags

AIR issues with entering Czech characters into text control

February 2nd, 2009 by Martin

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);
  }
}
 Tags
Text size: A A