In the function below, I begin by testing to see if a particular object is
null (the array of ComboBoxes that represent the children of a Repeater,
which may or may not exist). The element is defined in MXML, though of
course it may be null.

But if it *is *null, a null object reference error is thrown. Could someone
please explain this for me? (SDK 3.5, by the way).

            public function handleFilterChange():void{
                if(filterCombo!=null){
                    for(var i:int=0;i<filterCombo.length;i++){
                        for(var j:int=0;j<filterCombo[i].length;j++){
                            var cb:ComboBox = filterCombo[i][j] as
ComboBox;
                            cb.selectedItem=null;
                        }
                    }
                }
            }

-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

Reply via email to