5 Replies Latest reply on Jun 25, 2010 10:22 AM by Flex harUI

    Problem with Vector map() method


      I'm trying to map a Vector of Strings and assign the returning Vector to a variable, but the result from the map() is null...

      If I use an Array instead of a Vector.<String> the problem disappears...

      Here's the code:

      private var validPhotoExtensions:Vector.<String> = Vector.<String>(["jPG", "jpeg"]);


      var toLowerCase:Function = function(item:String, index:int, vector:Vector.<String>) : String
                                                      var str:String = String(item).toLowerCase();
                                                      return str;


      var bla:Vector.<String> = new Vector.<String>();

      // The value of bla will be nul...

      bla = validPhotoExtensions.map(toLowerCase);