A component's lifecycle doesn't start until after it is added to it's parent. So you are accessing the textWidth property before createChildren() or measure() or updateDisplayList() are called. I bet if you do the trace on the component's creationComplete event, you'll recieve the textWidth value.
i ended up doing
now my issue is that the width is kind of inaccurate.
for example my text box width is 700, and the measuredWidth is 650.
In the text box the text is wrapped. How could it be wrapping if its width is lower than 700?
Text can be any size because it flows the text. If you fix an explicitWidth
it will measure the height more accurately. Otherwise it tries to use a
square shape or its last known size.