3 Replies Latest reply on Aug 31, 2010 1:35 PM by Flex harUI

    How to conditionalize elements of the declarations tag

    Paul The Lad

      1) Does anyone know how to use inline compile time constants with the declarations tag?

      <s:Application>
          <fx:Declarations>

              <!-- somehow use the CONFIG::DEBUG here inline to conditionalize the following being added in the declaration tag? -->
              <nonVisual:CustomComponent/>
          </fx:Declarations>

      </s:Application>

       

      2) OR does anyone know how to add a non-visual custom component to an Application via the actionscript syntax? The declarations tag does it for us in the mxml syntax but what method would we use if we wanted to write this out in actionscript:

      <s:Application>
           <fx:Declarations>
              <nonVisual:CustomComponent/>
          </fx:Declarations>

      </s:Application>

      I know that addChild and addElement are for visual stuff, I need something for the non-visual stuff to be added to the Application.

       

      Thanks!