Monthly Archive for September, 2010

Minor update: v1.1

I’ve added a minor update to Astar. There was a little memory leak in getDataTile() which has now been fixed.

Thanks to Mario Benedek for pointing this out!

You can get the latest version on the A* page.

TextField.setSelection without clicking

If you want to select a certain part of a textfield you use TextField.setSelection. This will only work however if you put it inside a click handler of the textfield.

Why? Because when you click on your textfield it receives focus, which is necessary for setSelection to work.

Solution? First assign focus to the textfield manually and then call setSelection:

stage.focus = tf;
tf.setSelection(0, 5);