it's work: FlexGlobals.topLevelApplication.addElement(item);
but it's not:

```
public var app:Object = FlexGlobals.topLevelApplication;
trace(app) //it's null
app.addElement(item);

```

Error: Cannot access a property or method of a null object reference.

Why it's not working via variable?

**Edit:**
it's working in function like that:

```
private function bekleticiEkle():void{
    var app:Object = FlexGlobals.topLevelApplication;
    trace(app) //it's testClientApp0
    var item:Label = new Label;
    item.text = "Test";
    app.addElement(item);
}

```