View Single Post
Old 03-11-2009, 09:43 AM   PM User | #6
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
You are using an array index identifier that doesn't exist (i).

Code:
private function applicationCompleteHandler():void
{
var stringToSplit:String = myText.text;
var result:Array = stringToSplit.split(" ");
var Split:LogReader = new LogReader();

for (i=0;i<=result.length;i++)
{
Split.ip = result[0];
Split.date = result[3] + result[4];
Split.method = result[5];
Split.info = result[6] + result[7];
Split.url = result[8];
}

sourceArray.push(Split);
ac.refresh();

}
I guess I don't understand what you are trying to do, except that this code doesn't seem to make sense to me. I made another change in the for loop, because otherwise it won't run correctly (.length is for number of entries in an array here). What format is the data really coming in as (exactly) and what do you want it to sort into?
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote