Hi,

I have the following application,

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="components.*">
<mx:Script>
<![CDATA[
[Bindable]
public var myArray:Array=["A","B","C","D"];
[Bindable]
public var myQArray:Array=["A"];
]]>
</mx:Script>    
    <mx:ArrayCollection id="myAC" source="{myArray}"/>
    <mx:ArrayCollection id="myQArr" source="{myQArray}"/>
    <mx:Accordion id="accordion" x="139" y="303" width="200" height="200">
        <mx:Repeater id="myrep" dataProvider="{myAC}">
            <ns1:QuestionForm label="{myrep.currentItem}" width="199" height="178">
            <mx:Repeater  id="myrep2" dataProvider="{myQArr}">
                <mx:FormItem label="">
                    <mx:Button label="Inner"/>
                </mx:FormItem>
            </mx:Repeater>
            <mx:FormItem label="">
                <mx:Button label="Outer"/>
            </mx:FormItem>
            </ns1:QuestionForm>
        </mx:Repeater>
    </mx:Accordion>
</mx:Application>

QuestionForm is a custom component defined as follows,

<?xml version="1.0" encoding="utf-8"?>
<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
             public var categoryID:Number;
    </mx:Script>
</mx:Form>

</mx:Application>

When I run this application, Flash gives the following Exception & the application fails to load. However, if I change QuestionForm to Form, the application runs fine. Please let me know what is missing here.

TypeError: Error #1034: Type Coercion failed: cannot convert mx.core::[EMAIL PROTECTED] to Array.
    at mx.core::UIComponent/createReferenceOnParentDocument()
    at mx.core::Container/createComponentFromDescriptor()
    at mx.core::Container/createComponentsFromDescriptors()
    at mx.containers::Accordion/::instantiateSelectedChild()
    at mx.containers::Accordion/::commitSelectedIndex()
    at mx.containers::Accordion/mx.containers:Accordion::commitProperties()
    at mx.core::UIComponent/validateProperties()
    at mx.managers::LayoutManager/::validateProperties()
    at mx.managers::LayoutManager/::doPhasedInstantiation()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()




Thanks,
Aejaz __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to