2016-12-08 2 views
0

Ich habe eine Actionscript-3-Funktion wie folgt aussehen:Referenz mit statischen Typ Fehler

private function removeEntry(myT:Vector.<MyType>):void 
     { 
      for (var i:Number; = myT.length - 1; i >= 0; i--) 
      { 
       if(!myT[i].condition) 
       { 
        removeChild(myT[i]); 
        myT.removeAt(i); 
       } 
      } 
     } 

Leider bekomme ich folgende fiesen Fehler:

Description Resource Path Location Type Call to a possibly undefined method removeAt through a reference with static type Vector.. (...) Flex Problem

Was soll ich hier fehlt?

+0

Verwenden Sie Flash Player 19+ (oder Luft 19+)? Es ist eine ziemlich neue Methode. – BadFeelingAboutThis

Antwort

0

Ich löste dies durch Scheibe statt removeAt mit:

private function removeEntry(myT:Vector.<MyType>):void 
     { 
      for (var i:Number; = myT.length - 1; i >= 0; i--) 
      { 
       if(!myT[i].condition) 
       { 
        removeChild(myT[i]); 
        myT.slice(i, 1); 
       } 
      } 
     } 
Verwandte Themen