0 Replies Latest reply on Nov 26, 2009 5:55 AM by copperybean

    A error about Array

    copperybean

      When call the pop function of an Array, I got the error "Asynchronous viewer update", and I also attached the picture of error message.

       

      The type of variable m_array is Array, when I found the running result is not correct, I changed to the debug mode. And the problem occured at the secentence m_array.pop(). Before call this secentence, there are three elements in Array( the length of Array is 3 ), and the type of element is Point. So I realy don't what's the problem it is!?

       

      The problem occurs at the line 36 in the attach file, the calling code is

       

         var h:MinHeap = new MinHeap(function cmp(l:Point,r:Point):Boolean{return false;});
         var pt:Point = new Point;
         h.insert(pt.clone());
         h.extractMin();
         pt.x = 1;
         h.insert(pt.clone());
         pt.x = 0;
         pt.y = 1;
         h.insert(pt.clone());
         pt.x = 1;
         h.insert(pt.clone());
         h.extractMin();