XML Table setFormats()
What am I doing wrong? I took the AW 2.4 sample "xml - simple.htm" file and added the following code seen in bold:
But the result I get, is that at row number 4 I get all NaNs except for the last column. Furthermore, this is is the row that has the format correct for the entire column.
I also tried adding the following before the setFormats() command with the same results:
[b]var string = new AW.Formats.String;
var number= new AW.Formats.Number;
number.setTextFormat('#,###.##');[/b]
var table = new AW.XML.Table;
table.setURL("../data/companies-simple.xml");
[b]table.setFormats([string, string, string, string, number]);[/b]
table.request();
But the result I get, is that at row number 4 I get all NaNs except for the last column. Furthermore, this is is the row that has the format correct for the entire column.
I also tried adding the following before the setFormats() command with the same results:
table.setColumns(["ticker", "name", "mktcap", "sales", "employees"]);
Rick Villela
November 7,