Thanks for the help. I'm not sure if I'm writing the best code but I'm
cruising right along now.

On 10/21/07, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> Phil, have a go at this then...please forgive any typos.   Change the combo
> box to this and add the method below
>
> <mx:ComboBox id="stateCombo" labelField="state"
> data="state" width="60"
> change="handleChange( event )"/>
>
> and add
>
> import mx.controls.Alert;
>
> private function handleChange( event : Event ) : void
> {
>      Alert.show(event.target.selectedItem.toString());
> }
>
> This should tell you what the selectedItem looks like.  A first step in
> debugging your issue.
>
> One thing you have to realize and remember is that, the selectedItem
> property is a reference to the object in your dataProvider.  Thus any
> property in your dataProvider is in selectedItem.  Hence, label will not
> exist.  Depending on the type of objects in your dataProvider, this may or
> may not throw a error.    Thus what you probably need is
> event.target.selectedItem.state.
>
> HTH
>
> DK
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4736
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to