Illustrator onChaging event doesn't update the active editText?
Just testing this basic dialog.
The edit text should filter out the non-number characters or prevent them from being displayed in the editText box. You can see that the actual function does filter out the non-number characters but the editText box itself still displays the typed characters as is. It will only display the final filtered text once the editText loses focus.
Seems to work as intended in Photoshop and AfterEffect, just not in Illustrator.
Is this me or does it work fine for anyone else?
var w = new Window ('dialog');
w.group = w.add ('group');
var st = w.group.add ('statictext {text: "Enter a number:"}');
w.input = w.group.add ('edittext {characters: 10, active: true, justify: "right"}');
w.buttons = w.add ('group {alignment: "right"}');
w.ok = w.buttons.add ('button {text: "OK", enabled: true}');
w.buttons.add ('button {text: "Cancel"}');
w.input.onChanging = function ()
{
this.text = this.text.replace(/[^0-9,\.\s]/g, "");
st.text = this.text;
}
w.show();
