      */ 
     public function selectRange(anchorIndex:int, activeIndex:int):void
     {
-        // TODO: normalize?
-        setSelection(anchorIndex, activeIndex);
+        setSelection(Math.min(anchorIndex, activeIndex),
+                     Math.max(anchorIndex, activeIndex));
     }
     
     /**


use namespace mx_internal;

// TODO:
//  - load truncation indicator from resource
//  - verify focusEnabled functionality
//  - implement heightInLines/widthInChars (or remove)
//  - implement scrollToRange()
//  - dispatch isTruncatedChanged
//
//
// To use:
//   in createChildren():
//       var tf:MobileTextField = new MobileTextField();
//       tf.styleProvider = this;
//       tf.editable = true|false;   // for editable text
//       tf.multiline = true|false;  // for multiline text

    
    //--------------------------------------------------------------------------
    //
    //  Class variables
    //
    //--------------------------------------------------------------------------
    
    /**
     *  @private
     *  Most resources are fetched on the fly from the ResourceManager,
     *  so they automatically get the right resource when the locale changes.
     *  But since truncateToFit() can be called frequently,
     *  this class caches this resource value in this variable.
     *  Note that this class does _not_ support runtime local changes to
     *  the truncation indicator. The dynamic local change code in UITextField 
     *  can be used here, if needed.
     */ 
    private static var truncationIndicatorResource:String;
    
    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------
