views:

29

answers:

1

Extremely frustrated with this. I've created a simple class that extends the UIComponent. I create an instance of this class in a parent class and utilise the 'addChild' method to add it to the parent. I've overridden the 'updateDisplayList' method of the extended UIComponent to add my own drawing routine using the 'graphics' object.

My problem occurs when I start attempt to change any of the following properties (x , y , width, height) either directly or using 'move' or 'setActualSize' because the UIComponent will no longer display - prior to changing any of these properties the object displays fine. I know the object is still there, the 'updateDisplayList' method is still being called (as I'm calling 'invalidateDisplayList' after each change) and it correctly reports the changes.

I've been banging my head over this one for six hours now and it simply doesn't make sense?!?

M

A: 

Make sure you implement a measure method and set both measuredHeight, measuredWidth, measruedMinHeight, and measuredMinWidth. I've had odd issues with not setting the 'min' properties updateDisplayList is called with 'NaN' values which will confuse a lot of your sizing code.

But, beyond that you're going to have to share some code.

www.Flextras.com