3 Replies Latest reply on Aug 13, 2008 1:09 PM by jose3

    Instansiate components according to string value

    jose3
      Hi guys,
      I am looking foward to find a solution that could let me invoke and create components on stage based on the value of a string withouth having to end up using switch example like the first one below.

      I am aware of utilizing design patterns such as the Factory and Template Method Patterns can be an approach, however I am not sure how to implement it in such a way. Something that could look similar to this code is the one I attach below (Simple Factory).

      Has anybody used any of these design patterns methods to accomplish such thing? Could someone can give me orientation how to do this on Flex?

      Thanks lot.
      Jose