2 Replies Latest reply on Sep 14, 2011 1:51 PM by Jerry62712

    Why is the component hiding?

    Jerry62712 Level 1

      I'm converting a Flex 3.5 project to 4.0 and have hit several snags.  One is why does the component show up in the Flash builder and doesn't show up in the  Firefox browser?  The first component does show up, the buttons show up, but the input form doesn't.  Here is the code:

       

          <s:BorderContainer
              id="windowWorkspace"
              height="1900"
              width="100%"
              backgroundColor="#dedacf"
              includeIn="Input, Results, Help" >
              <s:layout.Input>
                  <s:VerticalLayout/>
              </s:layout.Input>

              <!-- ************************************************************** -->
              <!-- ** header area component ************************************* -->
              <DHSComp:DHSHeader
                  id="headerComp"
                  includeIn="Input, Results, Help"
                  width="100%"/>

              <!-- ************************************************************** -->
              <!-- ** Title and universal buttons ******************************* -->
              <s:HGroup
                  width="100%"
                  includeIn="Help, Input, Results">

                  <!--
                  click="helpAccess();"
                  -->
                  <s:Button
                      id="helpAccessButton"
                      label="{helpBtnText}"
                      toolTip=""
                      left="4"
                      top="4"
                      width="15%" height="22"
                      tabIndex="9" />

                  <s:TextArea
                      id="fsPageTitle"
                      text="{titleText}"
                      styleName="pageTitle"
                      top="4"
                      width="70%" height="22"
                      textAlign="center"
                      tabIndex="10" 
                      contentBackgroundColor="#dedacf"/>

                  <!--
                  click="swapLanguage();"
                  -->
                  <s:Button
                      id="languageSwitchButton"
                      label="{langBtnText}"
                      right="4"
                      top="4"
                      width="15%" height="22"
                      tabIndex="11" />
              </s:HGroup>

              <!-- ************************************************************** -->
              <!-- ** Input form ************************************************ -->
              <DHSComp:InputForm
                  width="100%"
                  includeIn="Input" />
          </s:BorderContainer>

       

      I can select the state in Flash Builder, but not in the code.  That is, in the script portion that is before the above I can't simply say:

              currentState="Input";
              setCurrentState("Input");

      One gives "undefined property" and the other "undefined method".

        • 1. Re: Why is the component hiding?
          robglobal Level 1

          IS this all of your code? I don't see where you have defined the states, i.e. <s:states> blocks. Also, you could try currentState =  on creation complete.

          • 2. Re: Why is the component hiding?
            Jerry62712 Level 1

            No, that isn't all the code.  There is no application tag for one <g>.

                <s:states>
                    <s:State name="Input" />
                    <s:State name="Results" />
                    <s:State name="Help" />
                </s:states>

             

            I had your suggestion about the application/creationComplete/currentState already in there.  I still don't see the componenet.

             

            I have the "includeIn" on the component and not every control in the component.  In this case I have the component include every state so there would be no reason that it wouldn't appear, especially when it does in the Flash Builder.

             

            That it appears there and not in the browser is one issue I don't understand.  It did appear as a Flex 3.5 application.