0 Replies Latest reply on Jan 26, 2014 12:52 PM by olegkon

    Spark skin incompatible with MX DataGrid?

    olegkon Level 1

      Hi,

       

      I am working on a screen where I need an MX AdvancedDataGrid and a regular DataGrid,

      and have Spark skin.

       

      I used to have a Spark skin there, everything worked fine, but it looks slightly different from ADG,

      so I am trying to replace that Spark DataGrid with either MX DataGrid or ADG.

      As soon as I do it, getting the following exception and screen turns white, nothing there:

      TypeError: Error #1034: Type Coercion failed: cannot convert mx.collections::ArrayList@d6724d9 to mx.controls.dataGridClasses.DataGridColumn.

                at mx.controls::DataGrid/set columns()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\controls\DataGrid.as:1357]

                at ieddata.metaweb.view::ExplorerViewSkin/_ExplorerViewSkin_DataGrid1_i()[C:\MSDE\konovalo\d ev\ieddata\pantheon_web\trunk\src\flexpackages\ieddata\metaweb\view\ExplorerViewSkin.mxml: 30]

                at Function/<anonymous>()

                at Function/http://adobe.com/AS3/2006/builtin::call()

                at mx.core::ComponentDescriptor/get properties()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ComponentDescriptor.a s:271]

                at mx.core::Container/createComponentFromDescriptor()[E:\dev\4.5.1\frameworks\projects\mx\sr c\mx\core\Container.as:4272]

                at mx.core::Container/createComponentsFromDescriptors()[E:\dev\4.5.1\frameworks\projects\mx\ src\mx\core\Container.as:4183]

                at mx.core::Container/createChildren()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\core\Conta iner.as:3189]

                at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7624]

                at mx.core::Container/initialize()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\core\Container .as:3131]

                at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]

                at mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7189]

                at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\ spark\src\spark\components\Group.as:2037]

                at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]

                at spark.components::Group/setMXMLContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark \components\Group.as:633]

                at spark.components::Group/set mxmlContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:573]

                at spark.components::SkinnableContainer/set mxmlContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\SkinnableContai ner.as:657]

                at spark.components::SkinnableContainer/createDeferredContent()[E:\dev\4.5.1\frameworks\proj ects\spark\src\spark\components\SkinnableContainer.as:1050]

                at mx.containers::ViewStack/instantiateSelectedChild()[E:\dev\4.5.1\frameworks\projects\mx\s rc\mx\containers\ViewStack.as:1260]

                at mx.containers::ViewStack/commitProperties()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\co ntainers\ViewStack.as:756]

                at mx.core::UIComponent/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\ mx\core\UIComponent.as:8209]

                at mx.managers::LayoutManager/validateProperties()[E:\dev\4.5.1\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:597]

                at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:813]

                at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1180]

       

       

      Skin which is my MXML view:

      <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"

                          xmlns:s="library://ns.adobe.com/flex/spark"

                    xmlns:fb="http://ns.adobe.com/flashbuilder/2009"

                          xmlns:mx="library://ns.adobe.com/flex/mx"

                          xmlns:view="ieddata.metaweb.view.*">     that is where that ExplorerViewSkin.mxml:30 is where exception is coming from.

                          <!-- alpha.disabled="0.5" -->

       

      That DataGrid in question is just plain vanilla, nothing special.

       

      So why would I get that exception?

       

      Please help!

       

       

      Using Flex 4.5.1

       

      TIA,

      Oleg.