Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 91258200A5B for ; Wed, 25 May 2016 14:29:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 900FD160A17; Wed, 25 May 2016 12:29:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B0AA8160A18 for ; Wed, 25 May 2016 14:29:14 +0200 (CEST) Received: (qmail 43896 invoked by uid 500); 25 May 2016 12:29:13 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 43846 invoked by uid 99); 25 May 2016 12:29:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2016 12:29:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CCF242C1F5C for ; Wed, 25 May 2016 12:29:12 +0000 (UTC) Date: Wed, 25 May 2016 12:29:12 +0000 (UTC) From: "Judah Frangipane (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (FLEX-35010) ns:RichTextEditor Error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 25 May 2016 12:29:15 -0000 [ https://issues.apache.org/jira/browse/FLEX-35010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15299949#comment-15299949 ] Judah Frangipane edited comment on FLEX-35010 at 5/25/16 12:29 PM: ------------------------------------------------------------------- This appears to be an error in the ButtonBarButton class of the Flex SDK. If we fix the ButtonBarButton class it should fix this issue. When the data property on a ButtonBarButton instance is set it is dispatching a generic flash.events.Event with the string parameter of "dataChange" like so: {code:ActionScript} public function set data(value:Object):void { content = value; dispatchEvent(new Event("dataChange")); } {code} The ButtonBarButton class expects a mx.events.FlexEvent for "dataChange" events: {code:ActionScript} [Event(name="dataChange", type="mx.events.FlexEvent")] {code} So the ButtonBarButton data setter should be dispatching a mx.events.FlexEvent like so: {code:ActionScript} dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); {code} instead of the current (line 194): {code:ActionScript} dispatchEvent(new Event("dataChange")); {code} I'm not able to create a patch at the moment but changing the above code to use mx.events.FlexEvent should fix it. *RichTextEditor Workaround* As a workaround to get the RichTextEditor to work you can remove the dataChange listeners on each of the ButtonBarButtons in the spark.skins.richTextEditorClasses.AlignToolSkin class. You will probably have to copy the skin class into your project in the same package and location as in the Flex SDK (called monkey patching) and then make the following changes: Before: {code:xml} {code} After: {code:XML} {code} Alternatively, you can could create your own ButtonBarButton class (monkey patch) that has the fixes above and you wouldn't need to modify the skin classes. was (Author: flexcapacitor): This appears to be an error in the ButtonBarButton class of the Flex SDK. If we fix the ButtonBarButton class it should fix this issue. When the data property on a ButtonBarButton instance is set it is dispatching a generic flash.events.Event with the string parameter of "dataChange" like so: {code:ActionScript} public function set data(value:Object):void { content = value; dispatchEvent(new Event("dataChange")); } {code} The ButtonBarButton class expects a mx.events.FlexEvent for "dataChange" events: {code:ActionScript} [Event(name="dataChange", type="mx.events.FlexEvent")] {code} So the ButtonBarButton data setter should be dispatching a mx.events.FlexEvent like so: {code:ActionScript} dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); {code} instead of the current (line 194): {code:ActionScript} dispatchEvent(new Event("dataChange")); {code} I'm not able to create a patch at the moment but changing the above code to use mx.events.FlexEvent should fix it. *RichTextEditor Workaround* As a workaround to get the RichTextEditor to work you can remove the dataChange listeners on each of the ButtonBarButtons in the spark.skins.richTextEditorClasses.AlignToolSkin class. You will probably have to copy the skin class into your project in the same package and location as in the Flex SDK (called monkey patching) and then make the following changes: Before: {code:xml} {code} After: {code:XML} {code} Alternatively, you can create your own ButtonBarButton class that has the fixes above. > ns:RichTextEditor Error > ----------------------- > > Key: FLEX-35010 > URL: https://issues.apache.org/jira/browse/FLEX-35010 > Project: Apache Flex > Issue Type: Bug > Affects Versions: Apache Flex 4.15.0 > Reporter: Lucas Henrique Bovetto > Labels: easyfix, easytest > > Error in ns:RichTextEditor component. > Just put the component in a container and run the programm > Error Message: > TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@89817b9 to mx.events.FlexEvent. > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at mx.core::UIComponent/dispatchEvent()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/framework/src/mx/core/UIComponent.as:13688] > at spark.components::ButtonBarButton/set data()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/spark/src/spark/components/ButtonBarButton.as:194] > at spark.components::SkinnableDataContainer/updateRenderer()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as:614] > at spark.components.supportClasses::ListBase/updateRenderer()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as:1248] > at spark.components.supportClasses::ButtonBarBase/updateRenderer()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as:508] > at spark.components::DataGroup/setUpItemRenderer()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/spark/src/spark/components/DataGroup.as:1162] > at spark.components::DataGroup/http://www.adobe.com/2006/flex/mx/internal::itemAdded()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/spark/src/spark/components/DataGroup.as:1706] > at spark.components::DataGroup/createItemRenderers()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/spark/src/spark/components/DataGroup.as:1062] > at spark.components::DataGroup/commitProperties()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/spark/src/spark/components/DataGroup.as:1091] > at mx.core::UIComponent/validateProperties()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/framework/src/mx/core/UIComponent.as:8751] > at mx.managers::LayoutManager/validateProperties()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/framework/src/mx/managers/LayoutManager.as:605] > at mx.managers::LayoutManager/doPhasedInstantiation()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/framework/src/mx/managers/LayoutManager.as:821] > at mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/justinmclean/Documents/ApacheFlex4.15/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188] -- This message was sent by Atlassian JIRA (v6.3.4#6332)