0 Replies Latest reply on Apr 6, 2010 11:31 PM by hiwa118

    TypeError: Error #1009: Cannot access a property or method of a null object reference.

    hiwa118

      hi every body

      i am new in flex and action script.

      i have one form that i add it formItems and it was worked very well after added textInput and when i want to access to textInput text it gives me thid error.

      i am just freaking out , i don't know couse of this error ,i have another formItem with comboBox element and i can access to value of selectedItem in that very easily.please if you have any ideas about this error please help me

      thanks.

       

      my code

       

      in this state

       

      <mx:State name="base">
                  <mx:AddChild relativeTo="{selectForm}" position="lastChild"
                      creationPolicy="all">
                      <mx:FormItem id="os1" label="state">
                          <mx:ComboBox id="ostan2" dataProvider="{stateArray}" close="ostan_closeHandler(event)" />
                      </mx:FormItem>
                  </mx:AddChild>
                  <mx:AddChild relativeTo="{selectForm}" position="lastChild"
                      creationPolicy="all">
                      <mx:FormItem  label="{lab16}">
                          <mx:TextInput id="dateInput" editable="true"/>
                      </mx:FormItem>
                  </mx:AddChild>
                  <mx:AddChild relativeTo="{selectForm}" position="lastChild"
                      creationPolicy="all">
                      <mx:FormItem  label="{lab17}">
                          <mx:TextInput  id="dateInput1" editable="true"/>
                      </mx:FormItem>
                  </mx:AddChild>

      </mx:State>