I recently ran into problems when trying to set the currenState property on a component that was part of a TabNavigator.

I had the component as a direct child in the TabNavigator.
Setting the currentState property in the component resulted in Null pointer exceptions in the Flex Framework – RemoveChild Class.

I got around it by first adding a canvas to my TabNavigator and then adding my component inside the canvas. This fixed the problem.

It is because of flex’s deferred instantiation. Flex called the creationComplete handler on my custom component even though its components were not added yet.
Thats why the RemoveChild tag in my states failed.

By first embedding the component into a canvas and then into the TabNavigator, it only created the canvas but not any parts of my component.