5 Replies Latest reply on Jul 27, 2010 12:11 PM by jsd99

    value of component.visible = NULL at creationcomplete


      I got a weird "problem" (or challenge)


      i got two components, and each one has visible="false" (both in different states as well)

      i am enabling them with buttons ( componentname.visible = true and switching currentState )


      but to be sure the others are turned off, i put othercomponent.visible = false.


                      domainViewer.visible = true;
                      if (!taxationViewer.visible){} else {taxationViewer.visible = false;}


      BUT the first time the application is loaded, none of the components "exist" yet, meaning i get an error (object NULL) for the othercomponent.visible = false


      i tried several things like

           domainViewer.visible = false;


           if (!domainViewer.visible){} else {domainViewer.visible = false;}


      but even then i get an error TypeError: Error #1009: cannot access an object that is NULL


      after the components have been loaded once, the errors are gone ofc.


      any suggestions for this?