5 Replies Latest reply on Jan 28, 2010 5:05 AM by uzairseedat

    Getting null while trying to access component child


      I have a custom component based on Canvas and inside that canvas I have a Panel with id = "mainPanel".  The problem is whenever I try to access mainPanel from a setter method within the component, I get null. e.g.


      public function set Content(newValue:String):void


      if(newValue != null)

           this.mainPanel.title = newValue;




      Why am I getting error for trying to access a null reference? Help please.