jabronicus
asked on
Flex: ArrayCollection :: Using Javascript Array to populate the ArrayCollection
I am developing a panel in Photoshop with Flex and Extendscript. I am pretty close to getting this to work, but with my Flex skills I am having a little issue with the Array I am pulling in from the jsx file. The function is being called but I am not sure that my grabFolderNames.data is the js array. Thanks for any help on this.
Here is my Flex
and here is the jsx:
Here is my Flex
protected function loadData():void {
var grabFolderNames:SyncRequestResult = CSXSInterface.instance.evalScript("labNames");
var list:String = grabFolderNames.data;
var array:Array = list.split(",");
var arrayCollection:ArrayCollection = new ArrayCollection();
arrayCollection.source = array;
labFolderList.dataProvider = arrayCollection;
}
and here is the jsx:
function labNames() {
var labs = ["Red", "Green", "Blue", "Purple", "Yellow"];
alert("This function is firing" + labs);
}
Make sure ArrayCollection is available as Class
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/collections/ArrayCollection.html
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/collections/ArrayCollection.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for jabronicus's comment #37693677
for the following reason:
This is the answer. ArrayCollections have to be dealt with as Object and XML
Accepted answer: 0 points for jabronicus's comment #37693677
for the following reason:
This is the answer. ArrayCollections have to be dealt with as Object and XML
ASKER
Sorry you disagree my friend, but your reply in #37691579 offers no additional content that is not in the original question.
Also your assumption that I have not spent time investigating the problem assumes that you can judge the amount of time that I spent coming up with the solution that I provided, that in the context the question was proposed SOLVES the issue.
I enjoy using this forum and have always had great relations with those that provide help, and by your statistics you have supplied help to many. However, in this case, dealing with Flex and Photoshop Panels, my own solution solved the ASKED question and it would be a diservice to to the forum and knowledge base to accept anything that you offered as a solution.
Also your assumption that I have not spent time investigating the problem assumes that you can judge the amount of time that I spent coming up with the solution that I provided, that in the context the question was proposed SOLVES the issue.
I enjoy using this forum and have always had great relations with those that provide help, and by your statistics you have supplied help to many. However, in this case, dealing with Flex and Photoshop Panels, my own solution solved the ASKED question and it would be a diservice to to the forum and knowledge base to accept anything that you offered as a solution.
ASKER
Sorry you disagree my friend, but your reply in #37691579 offers no additional content that is not in the original question.
Also your assumption that I have not spent time investigating the problem assumes that you can judge the amount of time that I spent coming up with the solution that I provided, that in the context the question was proposed SOLVES the issue.
I enjoy using this forum and have always had great relations with those that provide help, and by your statistics you have supplied help to many. However, in this case, dealing with Flex and Photoshop Panels, my own solution solved the ASKED question and it would be a diservice to to the forum and knowledge base to accept anything that you offered as a solution.
Also your assumption that I have not spent time investigating the problem assumes that you can judge the amount of time that I spent coming up with the solution that I provided, that in the context the question was proposed SOLVES the issue.
I enjoy using this forum and have always had great relations with those that provide help, and by your statistics you have supplied help to many. However, in this case, dealing with Flex and Photoshop Panels, my own solution solved the ASKED question and it would be a diservice to to the forum and knowledge base to accept anything that you offered as a solution.
var array:Array = list.split(",");
labFolderList.dataProvider