3 Replies Latest reply on Feb 11, 2011 4:38 PM by Ned Murphy

    addItem for listbox component

    DIY_Lobotomy Level 1



      I'm working to update a project that was created by someone else who left our company.  It was done in AS2, so I'd like to keep it that way (without updating all the code to AS3).  Here is a section of code that currently works:


      var item = {Rank:rank, City:city, Reps:representatives, RepsWithSales:RepsWithSales, Appts:appts, AvgSales:FormatAsDollars(average)};


      topSales is the listbox component.  The text to the left of the colon is the name of the header (so, the column label).  The text to the right of the colon is the data that populates each row (the lines of code above are within a loop).


      As I said, this all works fine.  But you see that one of the colums is labeled "RepsWithSales".  I wanted to name it "Reps With Sales" (put spaces between the words), but I can't find any way to do that where it works.  I always get errors.  I tried putting quotes around "Reps With Sales" as well as putting it in brackets. I've also tried putting "Reps With Sales" as a String into a variable, and then using that variable in place of "RepsWithSales".  No luck.  Any ideas?