[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Jason B
thanks TH your the best it works great ! --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > This works Jason: > > for (var i: int = 0; i < state.dataProvider.length; i++) > { > if ( val == [EMAIL PROTECTED]) > { >state.selectedIndex = i; >

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Tim Hoff
This works Jason: for (var i: int = 0; i < state.dataProvider.length; i++) { if ( val == [EMAIL PROTECTED]) { state.selectedIndex = i; } } -TH --- In flexcoders@yahoogroups.com, "Jason B" <[EMAIL PROTECTED]> wrote: > > Same error weird its not referencing the actual

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Jason B
Same error weird its not referencing the actual data? any other ideas what might be wrong? --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > Or, better yet. Since it's an attribute: > > [EMAIL PROTECTED] > > Talk about brain fatigue. :) > > -TH > > --- In flexco

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Tim Hoff
Or, better yet. Since it's an attribute: [EMAIL PROTECTED] Talk about brain fatigue. :) -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > Try: > > state.dataProvider.state[i].abbrev > > -TH > > --- In flexcoders@yahoogroups.com, "Jason B" nospam@ wrote: > > >

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Jason B
I get an error "unknown Property state" FYI its an XML list like this --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > Try: > > state.dataProvider.state[i].abbrev > > -TH

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Daniel Fernandes Credidio
i had the same problema while ago, i solved it likle this: thy changing the if for this comboboxname.dataProvider.source[i]["abbrev"] --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > Try: > > state.dataProvider.state[i].abbrev > > -TH > > --- In flexcoders@yahoogro

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Tim Hoff
Try: state.dataProvider.state[i].abbrev -TH --- In flexcoders@yahoogroups.com, "Jason B" <[EMAIL PROTECTED]> wrote: > > looks like var in this line has the data NY > var val : String = result.DATARESULTS.STATE; > > > > in the loop i see this line showing OBJECT something? weird its like > the s

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Jason B
looks like var in this line has the data NY var val : String = result.DATARESULTS.STATE; in the loop i see this line showing OBJECT something? weird its like the state.dataprovider is not working state.dataProvider[i].abbrev -<--NOTWORKING showing OBJECT(@

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Tim Hoff
Yep, Use the debug mode and set a breakpoint at the beginning of your loop. Check to see what the value of "val" is. Could this be a case sensitive issue? -TH --- In flexcoders@yahoogroups.com, "Jason B" <[EMAIL PROTECTED]> wrote: > > no errors but yet not selecting either? > is there a way

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Jason B
no errors but yet not selecting either? is there a way to debug it somehow? fyi im using so im trying to match up abbrev for (var i: int = 0; i < state.dataProvider.length; i++) { if ( val == state.dataProvider[i].abbrev) { state.selectedIndex =

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Tim Hoff
Sorry: var val : String = result.DATARESULTS.STATE; -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote: > > > Either declare the val variable outside of the function or add a > parameter. Something like this: > > public function defaultResult(event:ResultEvent):void > {

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Tim Hoff
Either declare the val variable outside of the function or add a parameter. Something like this: public function defaultResult(event:ResultEvent):void { var result:Object = event.result; var val = result.DATARESULTS.STATE; state_select(val); } public function state_select(val : String) -TH --

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Jason B
im not sure what the best way to do this? http://www.adobe.com/2006/mxml"; layout="absolute" width="650" height="350" creationComplete="stations_placeofbusiness.send();"> {station_id.text}

[flexcoders] Re: flex selecting combobox httpservice

2008-05-28 Thread Tim Hoff
Hey Jason, Looks like you have the right idea; looping through the dataProvider and setting the selectedIndex. This is probably not working because of a timing issue. Instead of trying to set val to the service result on creationComplete of the ComboBox, cast lastResult to val in the result han