Thanks Matt. So simple

--- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> If you are passing in strings to the ComboBox then you want to use
> startYear.selectedItem, if you pass in objects that have label
> properties you want to use startYear.selectedItem.label.
> 
>  
> 
> Matt
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of yaagcur
> Sent: Friday, October 28, 2005 3:41 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Referencing a combobox label (FLEX 2)
> 
>  
> 
> I'm still struggling with this
> 
> If I create an array 
> e.g.
> private var startYear:Array= 
>             [{label:"2005" },
>             {label:"2004" },
>             {label:"2003"} ];
> 
> then startYear.selectedItem.label gives me say 2005 correctly
> 
> If I, alternatively, create an extended combobox a la the illustration
> in livedocs
> http://livedocs.macromedia.com/labs/1/flex/wwhelp/wwhimpl/js/html/wwhelp
> .htm?href=00001531.html
> 
> <mx:dataProvider>    
>             <mx:String>2005</mx:String>
>             <mx:String>2004</mx:String>
>             <mx:String>2003</mx:String>
>     </mx:dataProvider>
> 
> The resulting use of the combobox with id ="startYear"populates
> correctly but I get the
> error
> Property label not found on Object and there is no default value
> 
> Any suggestions most welcome
> 
> --- In flexcoders@yahoogroups.com, "yaagcur" <[EMAIL PROTECTED]> wrote:
> >
> > Deepa 
> > Thanks for suggestion 
> > tried that and got error on initializtion of
> > 
> > 'Property label not found on Object and there is no default value'
> > 
> > and when I selected a year fom the comboBox the error that the 
> > required parameter was not found
> > 
> > Passing constants or the value of a text field as paramaters do work
> > Just cannot pick up the combo label
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "Deepa Subramaniam" <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > Hi-
> > > 
> > > Try startYear.selectedItem.label in your Model.
> > > 
> > > Deepa 
> > > 
> > > -----Original Message-----
> > > From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> > > Behalf Of yaagcur
> > > Sent: Wednesday, October 26, 2005 11:52 AM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Referencing a combobox label (FLEX 2)
> > > 
> > > 
> > > I am trying to get the value selected from an extended combobox
> > > into a model which I subsequently use as a parameter in a webservice
> > > 
> > > The relevant pieces of code I am trying are
> > > 
> > > Form
> > > <MyComp:testYearsComboBox id="startYear"   />
> > > 
> > > Model
> > > <mx:Model id="myFormModel">
> > > <minYearModel>{startYear.label}</minYearModel>
> > > 
> > > WebService
> > > <mx:operation name="getQuery" >
> > >    <mx:request>
> > >          <startYear>{myFormModel.minYearModel}</startYear>
> > >                
> > >    </mx:request>
> > >       </mx:operation>
> > > 
> > > I am getting this error
> > > 'Access of undefined property label through a reference with
> static type
> > > '
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --
> > > 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
> > >
> >
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> 
> 
> 
> 
> SPONSORED LINKS 
> 
> Web site design development
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+
> site+design+development&w2=Computer+software+development&w3=Software+des
> ign+and+development&w4=Macromedia+flex&c=4&s=126&.sig=ynjozILdtUiijfLjiz
> 5l1Q>  
> 
> Computer software development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We
> b+site+design+development&w2=Computer+software+development&w3=Software+d
> esign+and+development&w4=Macromedia+flex&c=4&s=126&.sig=i_RMdAMzxP1R8fB7
> NcnaqQ>  
> 
> Software design and development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=
> Web+site+design+development&w2=Computer+software+development&w3=Software
> +design+and+development&w4=Macromedia+flex&c=4&s=126&.sig=4g8hODKyQov1GX
> OxaXG2Sg>  
> 
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+
> development&w2=Computer+software+development&w3=Software+design+and+deve
> lopment&w4=Macromedia+flex&c=4&s=126&.sig=hhODNnONza_qi3x2OWe-Qg>  
> 
>  
> 
>  
> 
>  
> 
> ________________________________
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>         
> *      To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> 
>         
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> . 
> 
>  
> 
> ________________________________
>









------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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