4 Replies Latest reply on Feb 15, 2011 3:47 AM by JoshBeall

    Are dynamically inserted components a bad idea?  I'm getting intermittent "missing" controls.

    JoshBeall Level 1

      Hi All,


      I've got a view in my app where I show the user all the data they've entered so far.  To do this, I dynamically am creating and adding (via addElement(IVisualElement) on various containers) many components.


      It works fine... sometimes.  Other times I get strange behavior where the components don't show up at all, but there is empty whitespace where the control should be displayed.  It's as if the control was added and canvas space was reserved for the component, but it was never actually drawn onto the canvas.


      Is this possibly because my method of dynamically adding so many controls is something Flex or the Flash Player can't handle?  I'm adding between two and three dozen components to the canvas, and each of those components contains on average about 8 individual "basic" components (mostly spark Labels, and a few RichEditableText controls).