Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Edit Text onChange bug

$
0
0

Hi guys. I am experiencing a weird bug. Here's the code:

 

var myNumber = 3

var win = new Window( "dialog", "Slice it Up" );

 

var firstET = win.add("edittext", undefined, myNumber);

      firstET.characters = 5;

var secondET = win.add("edittext", undefined, myNumber);

      secondET.characters = 5;

 

firstET.onChange = function ()          { alert("Changed FIRST Edit Text");}

secondET.onChange = function ()    { alert("Changed SECOND Edit Text");}

win.show();

 

Thing is, when you change value in first Edit Text slot AND click with mouse button (or TAB) to activate second Edit Text, script calls secondET.onChange function before even calling firstET.onChange. Even though second Edit Text slot hasn't beed changed.


Is this a known bug? Tested on CS6 and CC, MacOS.

 

Am I doing something wrong here?


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>