What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reply to thread

With this part of code, I am trying to put all found layer names (layersData) into dropdownlist2_array, but instead of a list with names, I get one line with all names!!! Any idea what am I doing wrong? Thank you in advance!!!

[CODE=javascript]var layerNames = [];

for (var i = 0; i < layersData.length; i++)

{

    var layerName;

    layerName = layersData[i].name;

    layerNames.push(layerName);

};


var dropdownlist2_array = [layerNames];

var dropdownlist2 = panel2.add("dropdownlist", undefined, dropdownlist2_array);

dropdownlist2.selection = -1;

dropdownlist2.text = "Layer Name:";  [/CODE]


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top