In the debugger, does it show the values in the ArrayCollection members before you try to use the function? In other words can you trace the value assignment back to when the ArrayCollection is populated?
-- Howard Fore, [email protected] "The worthwhile problems are the ones you can really solve or help solve, the ones you can really contribute something to. ... No problem is too small or too trivial if we can really do something about it." - Richard P. Feynman On Thu, Sep 17, 2009 at 11:08 AM, Wally Kolcz <[email protected]> wrote: > > > I must be having a moron-moment. I have dollar amounts in the database > (45.32, 34.23, 50.25) and I want to look them and assign them to a Number > variable. But it keeps coming up as NaN or empty. What am I missing here? > > [Bindable] public var medTotal:Number = 0; > > public function calculateTotal(e:ArrayCollection):void { > for(var i:int = 0; i < e.length; i++){ > medTotal += e.getItemAt(i).cost; > } > } > > >

