4 Replies Latest reply on Jan 2, 2011 11:40 PM by kiran7881

    Flex 3:Cannot access a property or method of a null object reference.

    kiran7881 Level 1

      Hi ,

      Code Trouble , at begin of the New Year .

      Could anybody help me solving this Error :

       

      All this  code is from a some HeaderMXML Component

      On a Search  Image function  callMe() , i am doing this Below Operation

           public function callMe():void
              {
                  Application.application.Mails.visible=true;
                  Application.application.Results.visible=true;
                  if(Application.application.peopledg.visible==true)
                  Application.application.peopledg.visible=false;
              }

       

       

      This is my code inside inside Main Application.mxml

       

         <mx:states>

              <mx:State name="keywords">
                 <mx:AddChild>
               <mx:Panel  id="People" title="peoplepanel">
              <mx:DataGrid id="peopledg" dataProvider="{cuePointXMLList}">
                 <mx:columns >
      <mx:DataGridColumn headerText="people"  dataField="Name" >
      </mx:DataGridColumn>
      </mx:columns>
                 </mx:DataGrid>
      </mx:Panel>
           </mx:AddChild>
            </mx:State>
         </mx:states>

       

      Basically , on a New Search , i am trying to invisible the Existing Component .

       

      Please help . Thanks .