It looks that way. AlignTool is based on ButtonBarButton. When the
dataProvider is set it dispatches a "dataChange" event type as a regular
Event instead of a FlexEvent as you said.

The ButtonBarButton class expects it as a FlexEvent:

[Event(name="dataChange", type="mx.events.FlexEvent")]

So the ButtonBarButton data setter should be:

         dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));

instead of the current:

         dispatchEvent(new Event("dataChange"));

I'll update the issue in the bug base.


On Tue, May 24, 2016 at 11:10 AM, Alex Harui <[email protected]> wrote:

> Is there a ButtonBarButton involved?  It appears that it dispatches a
> dataChange event as a regular Event and not a FlexEvent.  Other code might
> be expecting a FlexEvent.
>
> -Alex
>
> On 5/24/16, 8:25 AM, "jude" <[email protected]> wrote:
>
> >I'm getting a run time error on the experimental rich text editor. I've
> >made a simple test case and pasted the code
> ><https://gist.github.com/monkeypunch3/a218dca6a9d02b5221519b8b0f66865b>
> >and
> >error here. I'm using 4.15.
> >
> >&lt;?xml version="1.0" encoding="utf-8"?>
> >&lt;s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009";
> >                       xmlns:s="library://ns.adobe.com/flex/spark"
> >                       xmlns:mx="library://ns.adobe.com/flex/mx"
> >                       xmlns:ns="http://flex.apache.org/experimental/ns";
> >                       >
> >
> >    &lt;ns:RichTextEditor verticalCenter="0" horizontalCenter="0"
> >width="300" height="300"/>
> >
> >&lt;/s:WindowedApplication>
> >
> >Error:
> >
> >TypeError: Error #1034: Type Coercion failed: cannot convert
> >flash.events::Event@25e81737bbc9 to mx.events.FlexEvent.
> >    at flash.events::EventDispatcher/dispatchEventFunction()
>
>

Reply via email to