Loading ...
Sorry, an error occurred while loading the content.
 

Re:Re: [flexcoders] defaultlisteffect 'addChild' error

Expand Messages
  • j2me_soul
    This is the entire stacktrace: Ezt [Desktop Application] file:/F:/Projects/Ezt/bin-debug/Ezt-app.xml Main Thread (Suspended: Error: addChild() is not available
    Message 1 of 6 , Aug 1, 2011
      This is the entire stacktrace:
       
      Ezt [Desktop Application] 
       file:/F:/Projects/Ezt/bin-debug/Ezt-app.xml 
        Main Thread (Suspended: Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.) 
         spark.components::Group/addChild 
         mx.core::UIComponent/attachOverlay 
         mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addOverlay 
         mx.effects.effectClasses::DissolveInstance/play 
         mx.effects::EffectInstance/startEffect 
         mx.effects.effectClasses::SequenceInstance/playCurrentChildSet 
         mx.effects.effectClasses::SequenceInstance/playNextChildSet 
         mx.effects.effectClasses::SequenceInstance/play 
         mx.effects::EffectInstance/startEffect 
         mx.effects.effectClasses::ParallelInstance/play 
         mx.effects::EffectInstance/startEffect 
         mx.effects::Effect/play 
         mx.controls.listClasses::ListBase/initiateDataChangeEffect 
         mx.controls.listClasses::ListBase/validateDisplayList 
         mx.managers::LayoutManager/validateDisplayList 
         mx.managers::LayoutManager/doPhasedInstantiation 
         mx.managers::LayoutManager/doPhasedInstantiationCallback 
       file:/F:/Projects/Ezt/bin-debug/Ezt-app.xml 
       
      All the error messages:
       
      Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.
       at spark.components::Group/addChild()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:2120]
       at mx.core::UIComponent/attachOverlay()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:11637]
       at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addOverlay()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:11605]
       at mx.effects.effectClasses::DissolveInstance/play()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\DissolveInstance.as:280]
       at mx.effects::EffectInstance/startEffect()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\EffectInstance.as:680]
       at mx.effects.effectClasses::SequenceInstance/playCurrentChildSet()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:631]
       at mx.effects.effectClasses::SequenceInstance/playNextChildSet()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:657]
       at mx.effects.effectClasses::SequenceInstance/play()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:410]
       at mx.effects::EffectInstance/startEffect()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\EffectInstance.as:680]
       at mx.effects.effectClasses::ParallelInstance/play()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\ParallelInstance.as:345]
       at mx.effects::EffectInstance/startEffect()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\EffectInstance.as:680]
       at mx.effects::Effect/play()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\Effect.as:1246]
       at mx.controls.listClasses::ListBase/initiateDataChangeEffect()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\controls\listClasses\ListBase.as:4085]
       at mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\controls\listClasses\ListBase.as:3960]
       at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736]
       at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:819]
       at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]

       

      At 2011-08-01 13:09:13,"Alex Harui" <aharui@...> wrote:
       

      Posting the entire stacktrace is always a good idea.


      On 7/31/11 5:28 PM, "j2me_soul" <j2me_soul@...> wrote:


       
       
         

      I try to use canvas to contain the TileList component.
      But I still got this error:
      Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.
      My code:
      <mx:Canvas width="76%" height="66%" horizontalCenter="0" bottom="10">
        <mx:TileList id="contentList" visible="true" width="100%" height="100%"
            horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalAlign="middle"
            itemRenderer="com.ezt.compon.renderer.tileListRenderer" maxColumns="3" maxRows="5"
            rowHeight="{contentList.height*0.20}" columnWidth="{contentList.width*0.33}"
            itemsChangeEffect="{DefaultListEffect}"
            contentBackgroundAlpha="0" borderAlpha="0" useRollOver="false"
            dataProvider="{new ArrayList(['1','2','3','4','5','6','7','8','9','10', '11','12','13','14','15'])}">
        </mx:TileList>
       </mx:Canvas>

      在 2011-07-31 13:13:35,"Alex Harui" <aharui@...> 写道:
       

       
       
         

      What is the TileList’s container?  Maybe use an mx container instead of a Spark one?


      On 7/29/11 8:42 PM, "j2me_soul" <j2me_soul@...> wrote:


       
       
         

      I use defaultListEffect on TileList conpoment.
      The error is " Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one. "
      My code is
       
      <mx:TileList id="contentList" visible="true" width="76%" height="66%" horizontalCenter="0" bottom="10"
           horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalAlign="middle"
           maxColumns="3" maxRows="5"
           rowHeight="{contentList.height*0.20}" columnWidth="{contentList.width*0.33}"
           itemsChangeEffect="{DefaultListEffect}"
           contentBackgroundAlpha="0" borderAlpha="0" useRollOver="false"
           dataProvider="{new ArrayList(['1','2','3','4','5','6','7','8','9','10', '11','12','13','14','15'])}">
      !   
       </mx:TileList>


       
         



      --
      Alex Harui
      Flex SDK Team
      Adobe System, Inc.
      http://blogs.adobe.com/aharui


    • Alex Harui
      There is a Group in there somewhere. Use the debugger to find out which one it is. Is your custom itemRenderer based on Group? That might be the problem. On
      Message 2 of 6 , Aug 1, 2011
        Re: [flexcoders] defaultlisteffect 'addChild' error There is a Group in there somewhere.  Use the debugger to find out which one it is.  Is your custom itemRenderer based on Group?  That might be the problem.


        On 8/1/11 2:06 AM, "j2me_soul" <j2me_soul@...> wrote:


         
         
           

        This is the entire stacktrace:
         
        Ezt [Desktop Application]
         file:/F:/Projects/Ezt/bin-debug/Ezt-app.xml
          Main Thread (Suspended: Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.)
           spark.components::Group/addChild
           mx.core::UIComponent/attachOverlay
           mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addOverlay
           mx.effects.effectClasses::DissolveInstance/play
           mx.effects::EffectInstance/startEffect
           mx.effects.effectClasses::SequenceInstance/playCurrentChildSet
           mx.effects.effectClasses::SequenceInstance/playNextChildSet
           mx.effects.effectClasses::SequenceInstance/play
           mx.effects::EffectInstance/startEffect
           mx.effects.effectClasses::ParallelInstance/play
           mx.effects::EffectInstance/startEffect
           mx.effects::Effect/play
           mx.controls.listClasses::ListBase/initiateDataChangeEffect
           mx.controls.listClasses::ListBase/validateDisplayList
           mx.managers::LayoutManager/validateDisplayList
           mx.managers::LayoutManager/doPhasedInstantiation
           mx.managers::LayoutManager/doPhasedInstantiationCallback
         file:/F:/Projects/Ezt/bin-debug/Ezt-app.xml
         
        All the error messages:
         
        Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.
         at spark.components::Group/addChild()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:2120]
         at mx.core::UIComponent/attachOverlay()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:11637]
         at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addOverlay()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:11605]
         at mx.effects.effectClasses::DissolveInstance/play()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\DissolveInstance.as:280]
         at mx.effects::EffectInstance/startEffect()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\EffectInstance.as:680]
         at mx.effects.effectClasses::SequenceInstance/playCurrentChildSet()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:631]
         at mx.effects.effectClasses::SequenceInstance/playNextChildSet()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:657]
         at mx.effects.effectClasses::SequenceInstance/play()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\SequenceInstance.as:410]
         at mx.effects::EffectInstance/startEffect()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\EffectInstance.as:680]
         at mx.effects.effectClasses::ParallelInstance/play()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\effectClasses\ParallelInstance.as:345]
         at mx.effects::EffectInstance/startEffect()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\EffectInstance.as:680]
         at mx.effects::Effect/play()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\effects\Effect.as:1246]
         at mx.controls.listClasses::ListBase/initiateDataChangeEffect()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\controls\listClasses\ListBase.as:4085]
         at mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\4.5.1\frameworks\projects\mx\src\mx\controls\listClasses\ListBase.as:3960]
         at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736]
         at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:819]
         at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]

         

        At 2011-08-01 13:09:13,"Alex Harui" <aharui@...> wrote:
         

         
         
           

        Posting the entire stacktrace is always a good idea.


        On 7/31/11 5:28 PM, "j2me_soul" <j2me_soul@...> wrote:


         
         
           

        I try to use canvas to contain the TileList component.
        But I still got this error:
        Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one.
        My code:
        <mx:Canvas width="76%" height="66%" horizontalCenter="0" bottom="10">
          <mx:TileList id="contentList" visible="true" width="100%" height="100%"
              horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalAlign="middle"
              itemRenderer="com.ezt.compon.renderer.tileListRenderer" maxColumns="3" maxRows="5"
              rowHeight="{contentList.height*0.20}" columnWidth="{contentList.width*0.33}"
              itemsChangeEffect="{DefaultListEffect}"
              contentBackgroundAlpha="0" borderAlpha="0" useRollOver="false"
              dataProvider="{new ArrayList(['1','2','3','4','5','6','7','8','9','10', '11','12','13','14','15'])}">
          </mx:TileList>
         </mx:Canvas>

        在 2011-07-31 13:13:35,"Alex Harui" <aharui@...> 写道:
         

         
         
           

        What is the TileList’s container?  Maybe use an mx container instead of a Spark one?


        On 7/29/11 8:42 PM, "j2me_soul" <j2me_soul@...> wrote:


         
         
           

        I use defaultListEffect on TileList conpoment.
        The error is " Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one. "
        My code is
         
        <mx:TileList id="contentList" visible="true" width="76%" height="66%" horizontalCenter="0" bottom="10"
             horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalAlign="middle"
             maxColumns="3" maxRows="5"
             rowHeight="{contentList.height*0.20}" columnWidth="{contentList.width*0.33}"
             itemsChangeEffect="{DefaultListEffect}"
             contentBackgroundAlpha="0" borderAlpha="0" useRollOver="false"
             dataProvider="{new ArrayList(['1','2','3','4','5','6','7','8','9','10', '11','12','13','14','15'])}">
        !   
         </mx:TileList>


         
           



        --
        Alex Harui
        Flex SDK Team
        Adobe System, Inc.
        http://blogs.adobe.com/aharui
      Your message has been successfully submitted and would be delivered to recipients shortly.