3 Replies Latest reply on Jan 14, 2011 10:14 AM by Flex harUI

    datagrid error can't quite understand why?

    miguel8312 Level 3

      TypeError: Error #1010: A term is undefined and has no properties.
      at mx.controls::DataGrid/scrollToEditedItem()[C:\autobuild\3.5.0\frameworks\projects\framewo rk\src\mx\controls\DataGrid.as:3792]
      at mx.controls::DataGrid/commitEditedItemPosition()[C:\autobuild\3.5.0\frameworks\projects\f ramework\src\mx\controls\DataGrid.as:3678]
      at mx.controls::DataGrid/updateDisplayList()[C:\autobuild\3.5.0\frameworks\projects\framewor k\src\mx\controls\DataGrid.as:1512]
      at mx.controls.listClasses::ListBase/validateDisplayList()[C:\autobuild\3.5.0\frameworks\pro jects\framework\src\mx\controls\listClasses\ListBase.as:3344]
      at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.5.0\frameworks\projects\f ramework\src\mx\managers\LayoutManager.as:622]
      at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.5.0\frameworks\projects \framework\src\mx\managers\LayoutManager.as:695]
      at Function/http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.5.0\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8744]
      at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.5.0\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8684]

       

       

      i have a datagrid which I hide then show another datagrid. to work with. while i was stepping through my code i get this error but when i run the app WITHOUT DEBUG i dont get the error. I havent nailed it down whether it has anything to do with the fact that i have two monitors and the above code from what it appears its trying to set focus back to the datagrid? while my cursor is on another monitor. IS this  a bug? I'm working with the 3.5 sdk and im using flash builder 4. has anyone else ever experienced this error? is their any way to catch this error? or stop it from happening? I know i have a lot of questions but GODLY im stuck.

       

      PLEASE HELP!!! THIS IS A WEIRD ONE!

        • 1. Re: datagrid error can't quite understand why?
          Flex harUI Adobe Employee

          The DG is trying to set up an item editor, but there doesn't seem to be a

          first row any more.  Not sure how you got into that situation.

           

          You can always override updateDisplayList and catch the error, but probably

          better to figure why you're in this situation.

          • 2. Re: datagrid error can't quite understand why?
            miguel8312 Level 3

            flex harUI im not sure either thats my problem?... do you have any suggestion as

            how i should go about debugging this? I'm litterally hiding one grid and then showing another?... I dont understand

            what could be causing the problem.  Can you offer any advice? would a better tecnique be to completely remove the first grid and then add the second grid and vice versa?

            Hope to hear back.

            Miguel

            • 3. Re: datagrid error can't quite understand why?
              Flex harUI Adobe Employee

              The stack trace points to a line of code and how we got there.  The stack

              trace says that the DG is trying to set up an item editor and can't find the

              first row.  It could be the one being hidden or the one being shown.  The

              debugger should be able to help you figure that out.

               

              The debugger will stop on that error and you should be able to determine

              which datagrid and why it is trying to set up an editor and whether its

              dataprovider is what you think it should be.