Arrays are not bindable.  That's why Flex has an ArrayList and
ArrayCollection class.  Then the trick is to use ArrayList or
ArrayCollection within the data objects instead of Array.

On 8/8/14 1:33 PM, "Scott Matheson" <[email protected]> wrote:

>Hi
>   if you think of a course made up of 10 lesson,
>
>lesson[]
>
>and the course has many lessons , and the student  can take the lesson
>test N times with each set of results held in an results object
>
>all works fine the challenge is getting the data back for display and
>making the data [Bindable]
>
>so i create an arrayCollection to hold the core data for display
>
>i pass the item render the specific lesson
>
><teacher:DictationLessonDetails displayPage="1"
>firstAtempt="{_u.dictationSyllabusArrayCol.getItemAt(1+lessonOffSet) as
>DictationLesson}" />
>
>this work fine, but in this object is all the results
>
>so this works in thee item render
>
><s:Label id="lesonTime" x="220" width="52" textAlign="center"
>text="{this.firstAtempt.time}"  verticalCenter="1"/>
>
>
>
>Now I need the specific of the last test of N tests
>
>text="{this.firstAtempt.results.getItemAt(0)
>
>would get me the result object, but.... how do i bind to the array of
>results
>
>text="{this.firstAtempt.results.getItemAt(0).result[0].score}"
>
>
>
>
>
>
>
>
>
>
>________________________________________
>From: Alex Harui [[email protected]]
>Sent: Friday, August 08, 2014 9:12 PM
>To: [email protected]
>Subject: Re: Object question
>
>An item renderer usually has a data property that references an object in
>the dataprovider/arraycollection.
>
>If the object has a field called results that is an array of other
>objects, it is important to determine if that is truly an array or an
>ArrayList or ArrayCollection.
>
>And if it is truly an array, then you have to use [0] instead of
>getItemAt(0), so I would expect renderer code to reference
>
>        this.data.results[0]
>
>HTH,
>-Alex
>
>
>On 8/8/14 11:24 AM, "Scott Matheson" <[email protected]> wrote:
>
>>Hi
>>     i have a array collection   of an object
>>
>>Records:
>>
>>field1:
>>field2:
>>Results[] holder 1,2,3,4 set of  each set of results can have 1-5
>>possible answers   So results is an array of Result objects
>>
>>in an an item, render i want the [0] of result object
>>
>>
>>this.firstAtempt.results.getItemAt(0).date
>>
>>
>>
>>does not seem to work ?
>>
>>
>>
>>
>>
>>________________________________
>>
>>Disclaimer: This electronic mail and any attachments are confidential and
>>may be privileged. If you are not the intended recipient, please notify
>>the sender immediately by replying to this email, and destroy all copies
>>of this email and any attachments. Thank you.
>
>
>________________________________
>
>Disclaimer: This electronic mail and any attachments are confidential and
>may be privileged. If you are not the intended recipient, please notify
>the sender immediately by replying to this email, and destroy all copies
>of this email and any attachments. Thank you.

Reply via email to