      */
     public function set selectedIndex(value:int):void
     {
-        var f:Function = function():void
+        // Defer the selection change if we haven't been initialized
+        
+        if (!initialized)
+        {        
+            // Append a deferred operation function that selects the specified index
+            
+            var f:Function = function():void
+            {
+                if (value != -1)
+                    setSelectedIndex(value);
+                else
+                    clearSelection();
+            }
+            deferredOperations.push(f);  // function f() to be called by commitProperties()
+            invalidateProperties();
+        }
+        else
         {
             if (value != -1)
                 setSelectedIndex(value);
             else
                 clearSelection();
         }
-        deferredOperations.push(f);  // function f() to be called by commitProperties()
-        invalidateProperties();
     }
     
     //----------------------------------

     */
    public function set selectedItem(value:Object):void
    {
        var f:Function = function():void
        {
            if (!dataProvider)
                return;

            const rowIndex:int = dataProvider.getItemIndex(value);
            if (rowIndex == -1)
                clearSelection();
            else
                setSelectedIndex(rowIndex);
        }
        deferredOperations.push(f);  // function f() to be called by commitProperties()
        invalidateProperties();
    }        
    
    //----------------------------------

                valueCopy.push(new CellPosition(cell.rowIndex, cell.columnIndex));
        }
        
        // Defer the selection change if we haven't been initialized
        
        if (!initialized)
        {        
            // Append a deferred operation function that selects the specified cells
            
            var f:Function = function():void
            {
                clearSelection();
                for each (cell in valueCopy)
                    addSelectedCell(cell.rowIndex, cell.columnIndex);
            }
            deferredOperations.push(f);  // function f() to be called by commitProperties()
            invalidateProperties();
        }
        else
        {
            clearSelection();
            for each (cell in valueCopy)
                addSelectedCell(cell.rowIndex, cell.columnIndex);            
        }
    }          

    //----------------------------------
