Thanks Alex. Yeah, currently I'm taking a similar approach, triggering a
method when *model.suppliers* changes ....

dataProvider="{
CollectionUtils.convertToPromptArrayCollection(model.suppliers) }"

and that method is:

public static function
convertToPromptArrayCollection(value:ArrayCollection):PromptArrayCollection
{
     return new PromptArrayCollection([{label:'[ all ]', data:-1}], value);
}

>probably easiest
that sounds like making the class support change notifications is perhaps
not the easiest thing then  :)


Much appreciated.




On Thu, Jul 3, 2008 at 6:02 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

>    It is probably easiest just to reset the CB's dp when the data is
> available.
>
>
>  ------------------------------
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *nwebb
> *Sent:* Thursday, July 03, 2008 1:45 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Extending the PromptArrayCollection Class (brain
> freeze)
>
>
>
> Hi,
>
> The Adobe technote provides a class for getting around the problem of
> having a re-selectable prompt for a combo box: (
> http://kb.adobe.com/selfservice/viewContent.do?externalId=1fecccba&sliceId=1
> )
>
> I've mainly been using it like this:
>
> <mx:ComboBox id="supplierComp"
>     dataProvider="{ new PromptArrayCollection ( [ {label:'[ all ]',
> data:-1} ], model.suppliers) }"/>
>
> At the time of setting it, *model.suppliers* is still an empty
> ArrayCollection. When it gets updated I'd like my *supplierComp* ComboBox
> to update appropriately. I've been going round in circles. Could someone
> point me in the right direction?
>
>  
>

Reply via email to