No but I'm glad you have

Though I note from a recent thread that it is not it its final version
(fLex2)

Also I had a quick attempt and got some errors
Is there a problem using it in conjunction with a
labelField?

--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Have you looked at the prompt property?
> Tracy
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of yaagcur
> Sent: Wednesday, November 16, 2005 4:58 PM
> To: [email protected]
> Subject: [flexcoders] Adding Item to a ComboBox
> 
> I currently successfully webservice in a list of schools which I place
> in a Combobox
> The key code being
> 
> a)<mx:operation name="getCities">
> 
> b)<mx:ArrayCollection id="cities"
> source="{mx.utils.ArrayUtil.toArray(ContactService.getCities.result)}"
> />
> 
> c)<mx:ComboBox id="cities_cb" dataProvider="{cities}"
> labelField="CITY" width="150"></mx:ComboBox>
> 
> I want to be able to add extra items e.g "All Cities"
> 
> I have tried to follow the livedocs example
> http://livedocs.macromedia.com/labs/1/flex/wwhelp/wwhimpl/js/html/wwhelp
> .htm?href=00000531.html
> updating an array using the IList interface
> 
> but am getting multiple errors when I try adding a function to 
> do addItemAt
> 
> a)<mx:operation name="getCities"
> result="citiesResultHandler(event.result)">
> 
> b)public function citiesResultHandler(result:Object)  {
>       
>  public var myIList:IList = new
> ArrayCollection({mx.utils.ArrayUtil.toArray(ContactService.getCities.res
> ult)});
> 
>         // The function to change the collection, and therefore the
> Array.
>         myIList.addItemAt("All Cities", 0);
>         
>  }
> 
> c) <mx:ComboBox id="cities_cb" dataProvider="{myIList}"
> labelField="CITY" width="150"></mx:ComboBox>
> 
> Obviously I am using the wrong terminology in the function 
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to