Somebody is listening for a "change" event and propagating it to a
listener that doesn't' expect it.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of george_w_canada
Sent: Thursday, August 30, 2007 11:14 AM
To: [email protected]
Subject: [flexcoders] Re: Flash/Flex Event collision on TextField input

 

Sorry. The second RTE was a code mistake. But the first one is there
every time, though if not Flash debugger player still work fine.

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "george_w_canada" <[EMAIL PROTECTED]> wrote:
>
> I have a component extend UIComponent with lots of classes inside
> using Flash Player API. Today I tried to add TextEvent.TEXT_INPUT
> listener for a TextField.
> 
> private function inputHandler(e:MouseEvent):void
> {
> this._tf.setSelection(0,1);
> //this._tf.addEventListener(TextEvent.TEXT_INPUT, textInputHandler,
> false, 0, true);
> }
> 
> I also bind textInput on the top of the component, as TextInput
class did:
> 
> [Event(name="textInput", type="flash.events.TextEvent")]
> 
> But each time when I try to input, error fired:
> 
> TypeError: Error #1034: Type Coercion failed: cannot convert
> flash.events::[EMAIL PROTECTED] to mx.events.IndexChangedEvent.
> 
> And when I add the listener (uncomment above), another error:
> TypeError: Error #1034: Type Coercion failed: cannot convert
> flash.events::[EMAIL PROTECTED] to mx.controls.TextInput.
> (why it was binded to TextInput???)
> 
> I have no idea how could get it work. I wonder whether I have to code
> it with Flash CS3 and use UIMovieClip with Flex component kit. (Not
> sure whether it still problem!?)
> 
> I googled this problem, found a bug report but Adobe seems no desire
> to fix that bug.
> https://bugs.adobe.com/jira/browse/SDK-11156
<https://bugs.adobe.com/jira/browse/SDK-11156> 
> 
> Any ideas?
> 
> Thanks,
> George
>

 

Reply via email to