flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jude <flexcapaci...@gmail.com>
Subject Re: RTE on RTE
Date Wed, 25 May 2016 12:14:49 GMT
As a workaround you can remove the dataChange event listeners on each of
the ButtonBarButtons in spark.skins.richTextEditorClasses.AlignToolSkin
class.

On Wed, May 25, 2016 at 6:59 AM, jude <flexcapacitor@gmail.com> wrote:

> 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 <aharui@adobe.com> 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" <flexcapacitor@gmail.com> 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()
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message