selected Item always give you the object.You have to typecast it into String
or use Selected Label.

Kind Regards
Abhijit


On Thu, Sep 24, 2009 at 8:45 AM, funandlearning3
<[email protected]>wrote:

>
>
> Hi,
>
> I have a combobox which is populated with query on backend. when I am
> trying to display a alert box with the selectedItem, I get the following
> error:
>
> Multiple markers at this line:Implicit coercion of a value with static type
> object to a possibly unrelated type string:
>
> Here is my code snippet
>
> private function checkAdvisor(event:Event):void{
>
> Alert.show(populateAdvisors.selectedItem);
> }
>
> MXML code:
>
> <mx:FormItem label="Advisor">
> <mx:ComboBox id="populateAdvisors" labelField="Advisor" width="150"
> change="checkAdvisor(event)"/>
> </mx:FormItem>
>
> Can anyone tell me where the mistake is?
>
> Thanks
>
>  
>



-- 
I may be miles away... but I am just a mail away.... so keep mailing...

Cheers,
Abhijit

Reply via email to