manuraj.dhanda
05-09-2007, 02:59 AM
Hello everyone,
I am trying to call a custom component which is a Repeater. As soon as I try to assign a dataprovider to it, it will give me the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at stir/stateHandler()
at Components::mySelection/resultHandler()
at Components::mySelection/___Operation1_result()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at ::NetConnectionMessageResponder/NetConnectionChannel.as$40:NetConnectionMessageRes ponder::resultHandler()
at mx.messaging::MessageResponder/result()
The statehandler method, where this problem is occuring is as follows:
public function stateHandler(strState:String, aList:ArrayCollection):void {
this.currentState = strState;
Alert.show("ArrayList is: "+strState+" - "+aList.length);
myResult.resultsRepeater.dataProvider = aList;
}
the problem occurs when I make a call to:
myResult.resultsRepeater.dataProvider = aList;
I am checking the length of aList, it is not null.
myResult --> <comp:Results id="myResult" width="100%" />
and <comp:Results is:
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:comp="Components.*">
<mx:Repeater id="resultsRepeater">
<mx:Label text="This is my Label"/>
<mx:TextArea id="resultTA" width="100%" height="25%" text="{resultsRepeater.currentIndex}"/>
</mx:Repeater>
</mx:Panel>
Please suggest me like where I am making a mistake.
Thanks.
Manu.
I am trying to call a custom component which is a Repeater. As soon as I try to assign a dataprovider to it, it will give me the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at stir/stateHandler()
at Components::mySelection/resultHandler()
at Components::mySelection/___Operation1_result()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at ::NetConnectionMessageResponder/NetConnectionChannel.as$40:NetConnectionMessageRes ponder::resultHandler()
at mx.messaging::MessageResponder/result()
The statehandler method, where this problem is occuring is as follows:
public function stateHandler(strState:String, aList:ArrayCollection):void {
this.currentState = strState;
Alert.show("ArrayList is: "+strState+" - "+aList.length);
myResult.resultsRepeater.dataProvider = aList;
}
the problem occurs when I make a call to:
myResult.resultsRepeater.dataProvider = aList;
I am checking the length of aList, it is not null.
myResult --> <comp:Results id="myResult" width="100%" />
and <comp:Results is:
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:comp="Components.*">
<mx:Repeater id="resultsRepeater">
<mx:Label text="This is my Label"/>
<mx:TextArea id="resultTA" width="100%" height="25%" text="{resultsRepeater.currentIndex}"/>
</mx:Repeater>
</mx:Panel>
Please suggest me like where I am making a mistake.
Thanks.
Manu.