;

PDA

Click to See Complete Forum and Search --> : v7-AS3 removeChild questions


imdumb
05-21-2009, 08:42 AM
I created a class for a saTextbox. It has several other classes it calls within the package.
var tb:saTextBox = new saTextBox();
addChild(tb);

When I try to removeChild(tb) it should set the var tb to null.
Well, it does not. It holds the Object saTextBox.
Any suggestions on why it doesn't set the variable to null?
Could there be variables within the saTextBox class that do not allow it null?

w.brants
05-21-2009, 08:50 AM
When I try to removeChild(tb) it should set the var tb to null.
Well, it does not. It holds the Object saTextBox.
Any suggestions on why it doesn't set the variable to null?
You remove tb from its parent. This doesn't mean the object ceases to exist.
If you want tb to be null after you remove it from its parent, do it manually by adding tb = null;

imdumb
05-21-2009, 08:58 AM
I was doing that, thanks. Just wanted to make sure I was not missing something by adding the tb=null; without need too.