Hi David, thanks for the reply. Yes, it's populating the array as
expected. Here's a better example script. This is a simplified
version of the actual script I'm using, but demonstrates the problem if you run
it in ExtendScript Toolkit (it should pop up an alert box giving the length of
the array but instead says ''undefined').
//~ Declare array (which will be populated with objects)
var textLineObjectArray = {};
var textLine="Sample";
//~ Split string into array of characters
var textLineArray = textLine.split('');
//~ Iterate through array and for each character, create an object
for (var i = 0; i < textLineArray.length; i++){
//~ Add character name to object
textLineObjectArray[i]={name:textLineArray[i]}
}
//~ output length of array of objects
alert(textLine1ObjectArray.length);
Can you see any problems with this?
Phil