If you just want to run the code in the comboChanged function, you can
just change the default value for the evt parameter...
private function comboChanged(evt:Event = null) :void
and then call the function with no parameters in your myTextChanged
function...
private function myTextChanged(evt:Event)
{
// Code here
comboChanged();
}
or you could create a new event and dispatch it...
private function myTextChanged(evt:Event)
{
// Code here
this.dispatchEvent(new ListEvent(ListEvent.CHANGE));
}
--- In [email protected], Angelo Anolin <angelo_ano...@...>
wrote:
>
> Kerry,
>
> What I mean is that the change event would be dispatched (or executed)
by the textinput change event.
>
> For example, I have a changed event function declared for my comboBox:
>
> private function comboChanged(evt:Event) :void
> {
> // Some codes here...
> }
>
> then on my textinput, i also have a textchanged event:
>
> private function myTextChanged(evt:Event)
> {
> // I want to call the comboChanged event here.
> // But how do I pass the parameter Event which the combo box uses?
> }
>
> I hope this clears further the question.
>
> Thanks.
>
>
>
>
> ________________________________
> From: Kerry Jordan kerry.d.jor...@...
> To: [email protected]
> Sent: Wed, 19 May, 2010 8:53:43
> Subject: Re: [flexcoders] Calling a ComboBox Change Event from
TextInput TextChanged event
>
>
> On Wed, May 19, 2010 at 8:38 AM, Angelo Anolin angelo_ano...@...
wrote:
> > I have a ComboBox change event which I want to call from a
textchanged event of a text input.
>
> What exactly do you mean by "call"? Do you wish to dispatch a change
> event or do you want to change the value of a specific ComboBox based
> on the value of a TextInput control? Must the change event be
> dispatched by the ComboBox control?
>
> Kerry
>