Thanks Tracey this is what I'd discovered.

I hadn't realised that:

<mx:whatever dataProvider="{arrDataSource}" />

is different to:

function setSomething()
{
    myComponent.dataProvider = arrDataSource
}

So I'm assuming that basically the {} in mxml does all the event wiring to
actually Bind the dataProvider whereas just setting the dataProvider in
actionscript just sets it the once.

Thanks,

Dan



On 11/03/2008, Tracy Spratt <[EMAIL PROTECTED]> wrote:
>
>    "…My ArrayCollection is really only going to be set once…" Don't bind.
> Set the dataProvider explicitly.
>
> Tracy
>
>
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *DannyT
> *Sent:* Tuesday, March 11, 2008 5:15 AM
> *To:* [email protected]
> *Subject:* [flexcoders] DataBinding Question
>
>
>
> I have a DataModel singleton which contains an arrayCollection to which I
> am binding a repeater.
>
> My DataModel also has a selectedItem property which I am binding another
> component to.
>
> When I update my selectedItem my repeater seems to be refreshing it's bind
> (the repeater's items contain children that are disappearing when I set the
> selectedItem).
>
> Is it expected that all properties of a class will refresh their bindings
> when any property changes? My ArrayCollection is really only going to be set
> once so I'd almost like to populate my repeater then 'break' that bind if
> that's possible? Or if anyone can suggest a better solution I'd be very
> grateful.
>
> Dan
>
> --
> http://danny-t.co.uk
>
>  
>



-- 
http://danny-t.co.uk

Reply via email to