1 Reply Latest reply on Dec 17, 2008 7:26 PM by fxBR

    Advanced Datagrid: Type error 1010 - get firstvisibleitem

    fxBR
      Hello everybody,
      I'm getting crazy with this error and the Advanced Datagrid. I'd like to know if somebody here could give me a hand to find out what is going on ...
      This error is being thrown in a couple situations. I cite just one here to easy things ...
      I use ... Flex Builder Pro 3.0.2 / Flex SDK 3.2.0 build 3958 (most updated by date)

      This application has 2 main viewstacks, inside the second one, I have another viewstack. Inside this viewstack, I have 3 Canvas with 1 Advanced Datagrid each Canvas.
      All of them have its dataprovider an ArrayCollection that I fill with data from a RemoteObjects method.

      I noticed that ...
      If the data that comes to fill this Advanced Datagrid is an empty array (length == 0), the next time I try to call a remoteobject method with args I see on the debugger that the method firstvisibleitem gets an exception thrown by the getter.
      This is non-sense because usually when I call this method, this is not related to the datagrid ...
      I have no idea how debug that ...

      Here is the error thrown ----------

      TypeError: Error #1010: A term is undefined and has no properties.
      at mx.controls::AdvancedDataGrid/get firstVisibleItem()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\controls \AdvancedDataGrid.as:3904]
      at ObjectOutput/writeObject()
      at mx.collections::ArrayList/writeExternal()[C:\autobuild\3.2.0\frameworks\projects\framewor k\src\mx\collections\ArrayList.as:452]
      at mx.collections::ArrayCollection/writeExternal()[C:\autobuild\3.2.0\frameworks\projects\fr amework\src\mx\collections\ArrayCollection.as:144]
      at ObjectOutput/writeObject()
      at mx.collections::ArrayList/writeExternal()[C:\autobuild\3.2.0\frameworks\projects\framewor k\src\mx\collections\ArrayList.as:452]
      at mx.collections::ArrayCollection/writeExternal()[C:\autobuild\3.2.0\frameworks\projects\fr amework\src\mx\collections\ArrayCollection.as:144]
      at flash.net::NetConnection/invokeWithArgsArray()
      at flash.net::NetConnection/call()
      at mx.messaging.channels::NetConnectionChannel/internalSend()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:257]
      at mx.messaging::Channel/send()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\ Channel.as:874]
      at mx.messaging.channels::PollingChannel/send()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\PollingChannel.as:313]
      at mx.messaging::ChannelSet/send()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messagi ng\ChannelSet.as:1177]
      at mx.messaging::ChannelSet/channelConnectHandler()[C:\autobuild\3.2.0\frameworks\projects\r pc\src\mx\messaging\ChannelSet.as:862]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.messaging::Channel/connectSuccess()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\ messaging\Channel.as:1036]
      at mx.messaging.channels::AMFChannel/resultHandler()[C:\autobuild\3.2.0\frameworks\projects\ rpc\src\mx\messaging\channels\AMFChannel.as:510]



      Thanks in advance,