3 Replies Latest reply on Jul 14, 2006 6:24 PM by upshotvideo

    Annoying TypeError on only few systems

    upshotvideo Level 1
      Im working on a project that works great here at work, but when I go home and go to the site, i get an annoying Flash Player 9 Error. If you dismiss them, the app works fine, and I've only been able to get the error on maybe 2 out of 12 or some computers. Is there a way to set Error Reporting to 'false' in my code? Ive tried to solve the error, but I see no problems with my code at all, nor does flex give my any errors. I pasted the actual error below, and here is the link.


      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at CommList/::display()
      at CommList/__commResults_change()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::mouseUpHandler()
      at mx.controls::DataGrid/mx.controls:DataGrid::mouseUpHandler()
        • 1. Re: Annoying TypeError on only few systems
          njadobe Level 1

          I can get the error on my machine if I go to "Community Listings" and click on the grid. Figuring out exactly what's happening would probably require debugging your app. Can you run it under the debugger on a machine that gets the error and see what breakpoint it's hitting? Or can you see any lines in display() where you might be referencing something uninitialized? The fact that it only happens the first time (at least for me) suggests that something might be initially uninitialized, but then gets initialized as a result of whatever processing you're doing on the click, which is why subsequent clicks don't cause the problem.


          • 2. Re: Annoying TypeError on only few systems
            upshotvideo Level 1
            Thanks, that makes sense. I'm going to look into it now. I've noticed there has been a problem with the text updating right away from within the AS function on the first click, so I put 'text=WHATEVER.selectedItem.node' right in the mxml element as well to solve that. So you're right, it must be exactly what you said. Does the A.S. not execute at all until one of its functions is triggered? Because it seems that after its called once, it runs through the mxml and initializing that element.
            • 3. Re: Annoying TypeError on only few systems
              upshotvideo Level 1
              I'm not on a computer where i can duplicate the problem right now, but could this be it?

              private function display():void{
              public function getCommInfo():String{
              var address:String = commResults.selectedItem.address+"\n";
              var city:String = commResults.selectedItem.city+", ";
              var state:String = commResults.selectedItem.state+", ";
              var zip:String = commResults.selectedItem.zip+"\n";
              var phone:String = commResults.selectedItem.phone+"\n";
              var fax:String = commResults.selectedItem.fax+"\n\n";
              var numUnits:String = commResults.selectedItem.num_units;
              return address + city + state + zip + phone + fax;
              does the getInfo function need to be ABOVE the display function because the display function is setting text based on the return value of a function that i beneath it. Or does that even matter?