Yes, I know the field name but I keep getting range error and I know the value 
is there. but even when it isn't how do I trap the error when the value 
requested returns an array of zero elements?
Thanks for the help.
Dan Pride
The exact error is...

RangeError: Index '0' specified is out of bounds. 
        at 
mx.collections::ListCollectionView/getItemAt()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:422]
        at 
mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:696]
        at Objects/findBasket2()[/Users/Lib/Documents/Flex Builder 
3/Gezer/src/ObjectsScript.as:199]
        at Objects/__findBasketButton_click()[/Users/Lib/Documents/Flex Builder 
3/Gezer/src/Objects.mxml:8]



--- On Tue, 7/8/08, Andreas Santoro <[EMAIL PROTECTED]> wrote:

> From: Andreas Santoro <[EMAIL PROTECTED]>
> Subject: AW: [flexcoders] Addressing ArrayCollection Data elements Question
> To: "[email protected]" <[email protected]>
> Date: Tuesday, July 8, 2008, 8:11 AM
> like this?
> 
> fieldCol.text = dataArr[0].FieldName
> 
> 
> 
> or you don't know the fieldname?
> 
> 
> 
> fieldCol.text = dataArr[0]["{FieldNameVar}"]
> 
> 
> 
> 
> 
> 
> ________________________________
> Von: [email protected]
> [EMAIL PROTECTED] im Auftrag von Dan Pride
> [EMAIL PROTECTED]
> Gesendet: Dienstag, 8. Juli 2008 13:49
> An: [email protected]
> Betreff: [flexcoders] Addressing ArrayCollection Data
> elements Question
> 
> 
> Hi
> I am using the create app from database to create an xml
> interface with a lamp back end. It works great of course
> and is a great intro tool.
> 
> I am trying to adapt it to pull a single set of values in
> response to a query without using a datagrid to catch the
> data.
> 
> I can't for the life of me figure out how to address
> the elements.
> The query is returning zero or one record, and I want to
> grab the field values and fill in text fields.
> i.e. fieldCol.text = dataArr ????
> Thanks
> Dan Pride
> This board is awesome, and my thanks to all those up here
> who respond.


      

Reply via email to