There is a problem in Flex 4 when you using the PopUpManager’s addPopUp() method to create a pop up that has a Spark container parent. This problem was reported in a JIRA bug: SDK-25082. If you call addPopUp(), you will get the runtime error:
Error: removeChild() is not available in this class. Instead, use removeElement() or modify the skin, if you have one.
Unfortunately, we didn’t have time to fix this bug in the Flex 4 time frame. So, the bug was deferred. However, there is a pretty simple workaround for the bug. In your code, you just need to parent the component that you want to pop up with an MX component.
Here are a couple of examples:
If you would like this bug fixed in the future, please go to it and vote on it. Otherwise, this may stay a bug in the framework for all of eternity. 😦