4 Replies Latest reply on Apr 29, 2011 7:49 AM by Flex harUI

    Problem with custom component and null properties

    NeoRamza2 Level 1

      Hi,

       

      I've created a custom component in Flex. Its is a Panel with a InputText and a button inside.

       

      Then I create a object like this:

       

           var comp:MyCustomComp = new MyCustomComp();

       

      But if I try to acess the inputtext.text, I got an error that says that I am trying to acess a null object.

       

           "Cannot access a property or method of a null object reference."

       

      Even using creationPolicy="all" in the Panel, it doenst work.

       

      I also noticed that the creationcomplete event is not called when I create the object.

       

      What should I do to this work? Tanks.